rename message to hint
This commit is contained in:
@@ -31,10 +31,10 @@ Statement
|
||||
"Zeige $ 42 = 42 $." : 42 = 42 := by
|
||||
rfl
|
||||
|
||||
-- Message : 42 = 42 =>
|
||||
-- Hint : 42 = 42 =>
|
||||
-- "Die Taktik `rfl` beweist ein Goal der Form `X = X`."
|
||||
|
||||
Hint : 42 = 42 =>
|
||||
HiddenHint : 42 = 42 =>
|
||||
"Man schreibt eine Taktik pro Zeile, also gib `rfl` ein und geh mit Enter ⏎ auf eine neue Zeile."
|
||||
|
||||
Conclusion "Bravo! PS: `rfl` steht für \"reflexivity\"."
|
||||
|
||||
@@ -26,7 +26,7 @@ Statement
|
||||
(n : ℕ) (h : 1 < n) : 1 < n := by
|
||||
assumption
|
||||
|
||||
Hint (n : ℕ) (h : 1 < n) : 1 < n =>
|
||||
HiddenHint (n : ℕ) (h : 1 < n) : 1 < n =>
|
||||
"`assumption` sucht nach einer Annahme, die dem Goal entspricht."
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Zeige, dass $A$ wahr ist."
|
||||
(A : Prop) (hA : A) : A := by
|
||||
assumption
|
||||
|
||||
Hint (A : Prop) (hA : A) : A =>
|
||||
HiddenHint (A : Prop) (hA : A) : A =>
|
||||
"Auch hier kann `assumption` den Beweis von `A` finden."
|
||||
|
||||
Conclusion ""
|
||||
|
||||
@@ -23,7 +23,7 @@ Zeige, dass daraus $A$ folgt."
|
||||
(A : Prop) (h : False) : A := by
|
||||
contradiction
|
||||
|
||||
Hint (A : Prop) (h : False) : A =>
|
||||
HiddenHint (A : Prop) (h : False) : A =>
|
||||
"Wenn man einen Beweis von `False` hat, kann man mit `contradiction` das Goal beweisen,
|
||||
unabhängig davon, was das Goal ist."
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ Statement "" (A B : Prop) (hA : A) (hB : B) : A ∧ B := by
|
||||
assumption
|
||||
assumption
|
||||
|
||||
Hint (A : Prop) (B : Prop) (hA : A) (hB : B) : A ∧ B =>
|
||||
HiddenHint (A : Prop) (B : Prop) (hA : A) (hB : B) : A ∧ B =>
|
||||
"`constructor` zerlegt die Struktur in Einzelteile."
|
||||
|
||||
Hint (A : Prop) (hA : A) : A =>
|
||||
HiddenHint (A : Prop) (hA : A) : A =>
|
||||
"Du hast einen Beweis dafür in den *Annahmen*."
|
||||
|
||||
Tactics constructor assumption
|
||||
@@ -51,24 +51,24 @@ Tactics constructor assumption
|
||||
-- intro
|
||||
-- assumption
|
||||
|
||||
-- Message (A : Prop) (B : Prop) : A ∧ (A → B) ↔ A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) : A ∧ (A → B) ↔ A ∧ B =>
|
||||
-- "`↔` oder `∧` im Goal kann man mit `constructor` zerlegen."
|
||||
|
||||
-- Message (A : Prop) (B : Prop) : A ∧ (A → B) → A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) : A ∧ (A → B) → A ∧ B =>
|
||||
-- "Hier würdest du mit `intro` die Implikation angehen.
|
||||
|
||||
-- (Experten können mit `intro ⟨h₁, h₂⟩` im gleichen Schritt noch ein `rcases` auf
|
||||
-- das UND in der Implikationsannahme)"
|
||||
|
||||
-- -- if they don't use `intro ⟨_, _⟩`.
|
||||
-- Message (A : Prop) (B : Prop) (h : A ∧ (A → B)) : A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) (h : A ∧ (A → B)) : A ∧ B =>
|
||||
-- "Jetzt erst mal noch schnell die Annahme `A ∧ (A → B)` mit `rcases` aufteilen."
|
||||
|
||||
-- Hint (A : Prop) (B : Prop) (hA : A) (h : A → B) : B =>
|
||||
-- HiddenHint (A : Prop) (B : Prop) (hA : A) (h : A → B) : B =>
|
||||
-- "Wie wär's mit `apply`? Hast du ne Implikation, die anwendbar ist?"
|
||||
|
||||
-- -- Rückrichtung
|
||||
-- Message (A : Prop) (B : Prop) : A ∧ B → A ∧ (A → B) =>
|
||||
-- Hint (A : Prop) (B : Prop) : A ∧ B → A ∧ (A → B) =>
|
||||
-- "Das Goal ist ne Implikation $\\ldots \\Rightarrow \\ldots$
|
||||
-- Da hilft `intro`.
|
||||
|
||||
@@ -78,16 +78,16 @@ Tactics constructor assumption
|
||||
|
||||
|
||||
-- -- if they don't use `intro ⟨_, _⟩`.
|
||||
-- Message (A : Prop) (B : Prop) (h : A ∧ B) : A ∧ (A → B) =>
|
||||
-- Hint (A : Prop) (B : Prop) (h : A ∧ B) : A ∧ (A → B) =>
|
||||
-- "Jetzt erst mal noch schnell die Annahme `A ∧ B` mit `rcases` zerlegen."
|
||||
|
||||
-- Message (A : Prop) (B : Prop) (hA : A) (h : A → B) : A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) (hA : A) (h : A → B) : A ∧ B =>
|
||||
-- "Wieder in Einzelteile zerlegen..."
|
||||
|
||||
-- Message (A : Prop) (B : Prop) (ha : A) (hb : B) : A ∧ (A → B) =>
|
||||
-- Hint (A : Prop) (B : Prop) (ha : A) (hb : B) : A ∧ (A → B) =>
|
||||
-- "Immer das gleiche ... noch mehr zerlegen."
|
||||
|
||||
-- -- Message (A : Prop) (B : Prop) (h₁: A) (h₂: B) : A → B =>
|
||||
-- -- Hint (A : Prop) (B : Prop) (h₁: A) (h₂: B) : A → B =>
|
||||
-- -- "Das ist jetzt vielleicht etwas verwirrend: Wir wollen die Implikation `A → B` zeigen,
|
||||
-- -- wissen aber, dass `B` immer wahr ist (habe eine Annahme der Form `(hB : B)`).
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@ Statement "Benutze `rcases` um das UND in `(h : A ∧ (B ∧ C))` zu zerlegen un
|
||||
rcases h with ⟨_, ⟨g , _⟩⟩
|
||||
assumption
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) (h : A ∧ (B ∧ C)) : B =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) (h : A ∧ (B ∧ C)) : B =>
|
||||
"Du kannst mit `rcases` auch verschachtelt mehrere Strukturen in einem Schritt zerlegen:
|
||||
`rcases h with ⟨h₁, ⟨h₂ , h₃⟩⟩`."
|
||||
|
||||
Hint (A : Prop) (hA : A) : A =>
|
||||
HiddenHint (A : Prop) (hA : A) : A =>
|
||||
"Du hast einen Beweis dafür in den *Annahmen*."
|
||||
|
||||
Tactics constructor assumption
|
||||
@@ -52,24 +52,24 @@ Tactics constructor assumption
|
||||
-- intro
|
||||
-- assumption
|
||||
|
||||
-- Message (A : Prop) (B : Prop) : A ∧ (A → B) ↔ A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) : A ∧ (A → B) ↔ A ∧ B =>
|
||||
-- "`↔` oder `∧` im Goal kann man mit `constructor` zerlegen."
|
||||
|
||||
-- Message (A : Prop) (B : Prop) : A ∧ (A → B) → A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) : A ∧ (A → B) → A ∧ B =>
|
||||
-- "Hier würdest du mit `intro` die Implikation angehen.
|
||||
|
||||
-- (Experten können mit `intro ⟨h₁, h₂⟩` im gleichen Schritt noch ein `rcases` auf
|
||||
-- das UND in der Implikationsannahme)"
|
||||
|
||||
-- -- if they don't use `intro ⟨_, _⟩`.
|
||||
-- Message (A : Prop) (B : Prop) (h : A ∧ (A → B)) : A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) (h : A ∧ (A → B)) : A ∧ B =>
|
||||
-- "Jetzt erst mal noch schnell die Annahme `A ∧ (A → B)` mit `rcases` aufteilen."
|
||||
|
||||
-- Hint (A : Prop) (B : Prop) (hA : A) (h : A → B) : B =>
|
||||
-- HiddenHint (A : Prop) (B : Prop) (hA : A) (h : A → B) : B =>
|
||||
-- "Wie wär's mit `apply`? Hast du ne Implikation, die anwendbar ist?"
|
||||
|
||||
-- -- Rückrichtung
|
||||
-- Message (A : Prop) (B : Prop) : A ∧ B → A ∧ (A → B) =>
|
||||
-- Hint (A : Prop) (B : Prop) : A ∧ B → A ∧ (A → B) =>
|
||||
-- "Das Goal ist ne Implikation $\\ldots \\Rightarrow \\ldots$
|
||||
-- Da hilft `intro`.
|
||||
|
||||
@@ -79,16 +79,16 @@ Tactics constructor assumption
|
||||
|
||||
|
||||
-- -- if they don't use `intro ⟨_, _⟩`.
|
||||
-- Message (A : Prop) (B : Prop) (h : A ∧ B) : A ∧ (A → B) =>
|
||||
-- Hint (A : Prop) (B : Prop) (h : A ∧ B) : A ∧ (A → B) =>
|
||||
-- "Jetzt erst mal noch schnell die Annahme `A ∧ B` mit `rcases` zerlegen."
|
||||
|
||||
-- Message (A : Prop) (B : Prop) (hA : A) (h : A → B) : A ∧ B =>
|
||||
-- Hint (A : Prop) (B : Prop) (hA : A) (h : A → B) : A ∧ B =>
|
||||
-- "Wieder in Einzelteile zerlegen..."
|
||||
|
||||
-- Message (A : Prop) (B : Prop) (ha : A) (hb : B) : A ∧ (A → B) =>
|
||||
-- Hint (A : Prop) (B : Prop) (ha : A) (hb : B) : A ∧ (A → B) =>
|
||||
-- "Immer das gleiche ... noch mehr zerlegen."
|
||||
|
||||
-- -- Message (A : Prop) (B : Prop) (h₁: A) (h₂: B) : A → B =>
|
||||
-- -- Hint (A : Prop) (B : Prop) (h₁: A) (h₂: B) : A → B =>
|
||||
-- -- "Das ist jetzt vielleicht etwas verwirrend: Wir wollen die Implikation `A → B` zeigen,
|
||||
-- -- wissen aber, dass `B` immer wahr ist (habe eine Annahme der Form `(hB : B)`).
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ Statement
|
||||
left
|
||||
assumption
|
||||
|
||||
Hint (A : Prop) (B : Prop) (hA : A) : A ∨ (¬ B) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (hA : A) : A ∨ (¬ B) =>
|
||||
"Entscheide dich, `right` oder `left`?"
|
||||
|
||||
Message (A : Prop) (B : Prop) (hA : A) : ¬ B =>
|
||||
Hint (A : Prop) (B : Prop) (hA : A) : ¬ B =>
|
||||
"Sackgasse. Probier's nochmals."
|
||||
|
||||
Tactics left right assumption
|
||||
|
||||
@@ -38,10 +38,10 @@ Statement
|
||||
rcases h with ⟨h₁, h₂⟩
|
||||
assumption
|
||||
|
||||
Hint (A : Prop) (B : Prop) (h : A ∨ (A ∧ B)) : A =>
|
||||
HiddenHint (A : Prop) (B : Prop) (h : A ∨ (A ∧ B)) : A =>
|
||||
"Als erstes kannst du das ODER in den Annahmen mit `rcases h with h | h` zerlegen."
|
||||
|
||||
Message (A : Prop) (B : Prop) (h : A ∧ B) : A =>
|
||||
Hint (A : Prop) (B : Prop) (h : A ∧ B) : A =>
|
||||
"Jetzt noch das UND in den Annahmen mit `rcases h with ⟨h₁, h₂⟩` zerlegen."
|
||||
|
||||
Tactics assumption rcases
|
||||
|
||||
@@ -95,31 +95,31 @@ $(A \\lor B) \\land (A \\lor C)$ wahr ist."
|
||||
right
|
||||
assumption
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) (h : B ∧ C) : (A ∨ B) ∧ (A ∨ C) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) (h : B ∧ C) : (A ∨ B) ∧ (A ∨ C) =>
|
||||
"Das `∧` in der Annahme kann mit `rcases h with ⟨h₁, h₂⟩` zerlegt werden."
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) : (A ∨ B) ∧ (A ∨ C) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) : (A ∨ B) ∧ (A ∨ C) =>
|
||||
"Das `∧` im Goal kann mit `constructor` zerlegt werden."
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) (h : A ∨ (B ∧ C)) : (A ∨ B) ∧ (A ∨ C) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) (h : A ∨ (B ∧ C)) : (A ∨ B) ∧ (A ∨ C) =>
|
||||
"Das `∨` in der Annahme kann mit `rcases h with h | h` zerlegt werden."
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) (h : A ∨ (B ∧ C)) : (A ∨ B) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) (h : A ∨ (B ∧ C)) : (A ∨ B) =>
|
||||
"Das `∨` in der Annahme kann mit `rcases h with h | h` zerlegt werden."
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) (h : A ∨ (B ∧ C)) : (A ∨ C) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) (h : A ∨ (B ∧ C)) : (A ∨ C) =>
|
||||
"Das `∨` in der Annahme kann mit `rcases h with h | h` zerlegt werden."
|
||||
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) (h : B ∧ C) : (A ∨ B) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) (h : B ∧ C) : (A ∨ B) =>
|
||||
"Das `∧` in der Annahme kann mit `rcases h with ⟨h₁, h₂⟩` zerlegt werden."
|
||||
|
||||
Hint (A : Prop) (B : Prop) (C : Prop) (h : B ∧ C) : (A ∨ C) =>
|
||||
HiddenHint (A : Prop) (B : Prop) (C : Prop) (h : B ∧ C) : (A ∨ C) =>
|
||||
"Das `∧` in der Annahme kann mit `rcases h with ⟨h₁, h₂⟩` zerlegt werden."
|
||||
|
||||
-- TODO: Message nur Anhand der Annahmen?
|
||||
-- TODO: Hint nur Anhand der Annahmen?
|
||||
|
||||
Hint (A : Prop) (B : Prop) : A ∨ B =>
|
||||
HiddenHint (A : Prop) (B : Prop) : A ∨ B =>
|
||||
"`left` oder `right`?"
|
||||
|
||||
Tactics left right assumption constructor rcases rfl contradiction trivial
|
||||
|
||||
Reference in New Issue
Block a user