fix missing lemma docs from statement names
This commit is contained in:
@@ -464,3 +464,21 @@ LemmaDoc Iff.symm as "Iff.symm" in "Logic"
|
||||
|
||||
* Mathlib Doc: [#Iff.symm](https://leanprover-community.github.io/mathlib4_docs/Init/Core.html#Iff.symm)
|
||||
"
|
||||
|
||||
LemmaDoc not_imp_not as "not_imp_not" in "Logic"
|
||||
"
|
||||
`theorem not_imp_not {a : Prop} {b : Prop} : ¬a → ¬b ↔ b → a`
|
||||
|
||||
## Eigenschaften
|
||||
|
||||
* Mathlib Doc: [#not_imp_not](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Logic/Basic.html#not_imp_not)
|
||||
"
|
||||
|
||||
LemmaDoc Set.nonempty_iff_ne_empty as "nonempty_iff_ne_empty" in "Logic"
|
||||
"
|
||||
`theorem Set.nonempty_iff_ne_empty {α : Type u} {s : Set α} : Set.Nonempty s ↔ s ≠ ∅`
|
||||
|
||||
## Eigenschaften
|
||||
|
||||
* Mathlib Doc: [#nonempty_iff_ne_empty](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.nonempty_iff_ne_empty)
|
||||
"
|
||||
|
||||
@@ -20,7 +20,8 @@ aber er möchte, dass du ihm das hier und jetzt nochmals von Grund auf zeigst.
|
||||
open Function
|
||||
|
||||
--TODO: This is a really hard proof
|
||||
Statement bijective_iff_has_inverse "" {A B : Type} (f : A → B) :
|
||||
-- bijective_iff_has_inverse
|
||||
Statement "" {A B : Type} (f : A → B) :
|
||||
Bijective f ↔ ∃ g, LeftInverse g f ∧ RightInverse g f := by
|
||||
constructor
|
||||
intro h
|
||||
|
||||
@@ -19,7 +19,9 @@ aber er möchte, dass du ihm das hier und jetzt nochmals von Grund auf zeigst.
|
||||
|
||||
open Function
|
||||
set_option pp.rawOnError true
|
||||
Statement bijective_iff_has_inverse "" {A B : Type} (f : A → B) :
|
||||
|
||||
-- bijective_iff_has_inverse
|
||||
Statement {A B : Type} (f : A → B) :
|
||||
Bijective f ↔ ∃ g, LeftInverse g f ∧ RightInverse g f := by
|
||||
Branch
|
||||
exfalso
|
||||
|
||||
@@ -27,7 +27,8 @@ local notation "ℝ²" => Fin 2 → ℝ
|
||||
|
||||
open Submodule Set Finsupp
|
||||
|
||||
Statement mem_span_of_mem
|
||||
-- mem_span_of_mem
|
||||
Statement
|
||||
"Zeige, dass $x \\in M$ auch Element von der $K$-linearen Hülle
|
||||
\\langle M \\rangle ist."
|
||||
{V K : Type _} [Field K] [AddCommMonoid V]
|
||||
|
||||
@@ -19,7 +19,7 @@ Introduction
|
||||
Sofort taucht das nächste Blatt auf. Anscheinend hatten sie sich auf einen Kompromiss geeinigt.
|
||||
"
|
||||
|
||||
Statement odd_square (n : ℕ) (h : Odd n) : Odd (n ^ 2) := by
|
||||
Statement (n : ℕ) (h : Odd n) : Odd (n ^ 2) := by
|
||||
Hint (hidden := true) "**Robo**: mit `rcases h with ⟨r, hr⟩` kannst du wieder
|
||||
das `r` nehmen, das laut Annahme existieren muss.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ erklärt mir doch folgendes:
|
||||
|
||||
open Set
|
||||
|
||||
Statement mem_univ "" {A : Type} (x : A) : x ∈ (univ : Set A) := by
|
||||
Statement Set.mem_univ "" {A : Type} (x : A) : x ∈ (univ : Set A) := by
|
||||
Hint "**Du**: Also `A` ist ein `Type`, `x` ist ein Element in `A`…
|
||||
|
||||
**Robo** … und `univ` ist die Menge aller Elemente in `A`.
|
||||
|
||||
@@ -18,7 +18,7 @@ Ihr zieht also durch die Gegend und redet mit den Leuten. Ein Junge rennt zu euc
|
||||
|
||||
open Set
|
||||
|
||||
Statement not_mem_empty "" {A : Type} (x : A) :
|
||||
Statement Set.not_mem_empty "" {A : Type} (x : A) :
|
||||
x ∉ (∅ : Set A) := by
|
||||
Hint "**Du**: Kein Element ist in der leeren Menge enthalten? Das ist ja alles
|
||||
tautologisches Zeugs...
|
||||
|
||||
@@ -31,7 +31,7 @@ aufteilen.
|
||||
|
||||
open Set Subset
|
||||
|
||||
Statement subset_empty_iff {A : Type _} (s : Set A) :
|
||||
Statement Set.subset_empty_iff {A : Type _} (s : Set A) :
|
||||
s ⊆ ∅ ↔ s = ∅ := by
|
||||
Hint "**Du**: Ja, die einzige Teilmenge der leeren Menge ist die leere Menge.
|
||||
Das ist doch eine Tautologie?
|
||||
|
||||
@@ -22,7 +22,7 @@ Zeige folgendes Lemma, welches wir gleich brauchen werden:
|
||||
open Set
|
||||
|
||||
|
||||
Statement eq_empty_iff_forall_not_mem
|
||||
Statement Set.eq_empty_iff_forall_not_mem
|
||||
""
|
||||
{A : Type _} (s : Set A) :
|
||||
s = ∅ ↔ ∀ x, x ∉ s := by
|
||||
|
||||
@@ -21,8 +21,7 @@ Zeige dass die beiden Ausdrücke äquivalent sind:
|
||||
|
||||
open Set
|
||||
|
||||
Statement nonempty_iff_ne_empty
|
||||
""
|
||||
Statement Set.nonempty_iff_ne_empty
|
||||
{A : Type _} (s : Set A) :
|
||||
s.Nonempty ↔ s ≠ ∅ := by
|
||||
Hint "Am besten fängst du mit `unfold Set.Nonempty` an."
|
||||
|
||||
@@ -42,7 +42,6 @@ open Set
|
||||
#check mem_compl_iff
|
||||
|
||||
Statement
|
||||
""
|
||||
(A B C : Set ℕ) : (A \ B)ᶜ ∩ (C \ B)ᶜ = ((univ \ A) \ C) ∪ (univ \ Bᶜ) := by
|
||||
rw [←compl_union]
|
||||
rw [←union_diff_distrib]
|
||||
|
||||
@@ -22,7 +22,7 @@ open Fin
|
||||
|
||||
open BigOperators
|
||||
|
||||
Statement odd_arithmetic_sum
|
||||
Statement
|
||||
"$\\sum_{i = 0}^n (2n + 1) = n ^ 2$."
|
||||
(n : ℕ) : (∑ i : Fin n, (2 * (i : ℕ) + 1)) = n ^ 2 := by
|
||||
Hint "**Robo**: Das funktioniert genau gleich wie zuvor, viel Glück."
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
import GameServer.Commands
|
||||
|
||||
LemmaDoc MyNat.add_zero as "add_zero" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.add_succ as "add_succ" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.zero_add as "zero_add" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.add_assoc as "add_assoc" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.succ_add as "succ_add" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.add_comm as "add_comm" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.one_eq_succ_zero as "one_eq_succ_zero" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc not_iff_imp_false as "not_iff_imp_false" in "Prop"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.succ_inj as "succ_inj" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
LemmaDoc MyNat.zero_ne_succ as "zero_ne_succ" in "Nat"
|
||||
""
|
||||
"(missing)"
|
||||
|
||||
@@ -36,7 +36,7 @@ note that `zero_add` is about zero add something, and `add_zero` is about someth
|
||||
The names of the proofs tell you what the theorems are. Anyway, let's prove `0 + n = n`.
|
||||
"
|
||||
|
||||
Statement zero_add
|
||||
Statement MyNat.zero_add
|
||||
"For all natural numbers $n$, we have $0 + n = n$."
|
||||
(n : ℕ) : 0 + n = n := by
|
||||
Hint "You can start a proof by induction over `n` by typing:
|
||||
|
||||
@@ -30,7 +30,7 @@ that addition, as defined the way we've defined it, is associative.
|
||||
See if you can prove associativity of addition.
|
||||
"
|
||||
|
||||
Statement add_assoc
|
||||
Statement MyNat.add_assoc
|
||||
"On the set of natural numbers, addition is associative.
|
||||
In other words, for all natural numbers $a, b$ and $c$, we have
|
||||
$ (a + b) + c = a + (b + c). $"
|
||||
|
||||
@@ -42,7 +42,7 @@ that `a + succ(b) = succ(a + b)`. The tactic `rw [add_succ]` just says to Lean \
|
||||
what the variables are\".
|
||||
"
|
||||
|
||||
Statement succ_add
|
||||
Statement MyNat.succ_add
|
||||
"For all natural numbers $a, b$, we have
|
||||
$ \\operatorname{succ}(a) + b = \\operatorname{succ}(a + b)$."
|
||||
(a b : ℕ) : succ a + b = succ (a + b) := by
|
||||
|
||||
@@ -29,7 +29,7 @@ Look in your inventory to see the proofs you have available.
|
||||
These should be enough.
|
||||
"
|
||||
|
||||
Statement add_comm
|
||||
Statement MyNat.add_comm
|
||||
"On the set of natural numbers, addition is commutative.
|
||||
In other words, for all natural numbers $a$ and $b$, we have
|
||||
$a + b = b + a$."
|
||||
|
||||
@@ -40,7 +40,7 @@ some theorems about $0$ (`zero_add`, `add_zero`), but, other than `1 = succ 0`,
|
||||
no theorems at all which mention $1$. Let's prove one now.
|
||||
"
|
||||
|
||||
Statement succ_eq_add_one
|
||||
Statement --MyNat.succ_eq_add_one
|
||||
"For any natural number $n$, we have
|
||||
$ \\operatorname{succ}(n) = n+1$ ."
|
||||
(n : ℕ) : succ n = n + 1 := by
|
||||
|
||||
@@ -35,7 +35,7 @@ additions of the form `a + ?`, and `rw add_comm a b,` will only
|
||||
swap additions of the form `a + b`.
|
||||
"
|
||||
|
||||
Statement add_right_comm
|
||||
Statement --add_right_comm
|
||||
"For all natural numbers $a, b$ and $c$, we have
|
||||
$a + b + c = a + c + b$."
|
||||
(a b c : ℕ) : a + b + c = a + c + b := by
|
||||
|
||||
@@ -17,7 +17,7 @@ theorem MyNat.succ_inj {a b : ℕ} : succ a = succ b → a = b := by simp only [
|
||||
|
||||
theorem MyNat.zero_ne_succ (a : ℕ) : zero ≠ succ a := by simp only [ne_eq, not_false_iff]
|
||||
|
||||
Statement succ_inj'
|
||||
Statement -- MyNat.succ_inj'
|
||||
""
|
||||
{a b : ℕ} (hs : succ a = succ b) : a = b := by
|
||||
exact succ_inj hs
|
||||
|
||||
@@ -16,7 +16,7 @@ Introduction
|
||||
|
||||
set_option tactic.hygienic false
|
||||
|
||||
Statement and_symm
|
||||
Statement --and_symm
|
||||
""
|
||||
(P Q : Prop) : P ∧ Q → Q ∧ P := by
|
||||
intro h
|
||||
|
||||
@@ -14,7 +14,7 @@ Introduction
|
||||
|
||||
"
|
||||
|
||||
Statement and_trans
|
||||
Statement --and_trans
|
||||
""
|
||||
(P Q R : Prop) : P ∧ Q → Q ∧ R → P ∧ R := by
|
||||
intro hpq
|
||||
|
||||
@@ -14,7 +14,7 @@ Introduction
|
||||
|
||||
"
|
||||
|
||||
Statement iff_trans
|
||||
Statement --iff_trans
|
||||
""
|
||||
(P Q R : Prop) : (P ↔ Q) → (Q ↔ R) → (P ↔ R) := by
|
||||
intro hpq
|
||||
|
||||
@@ -14,7 +14,7 @@ Introduction
|
||||
|
||||
"
|
||||
|
||||
Statement iff_trans
|
||||
Statement --iff_trans
|
||||
""
|
||||
(P Q R : Prop) : (P ↔ Q) → (Q ↔ R) → (P ↔ R) := by
|
||||
intro hpq hqr
|
||||
|
||||
@@ -15,7 +15,7 @@ Introduction
|
||||
|
||||
"
|
||||
|
||||
Statement or_symm
|
||||
Statement --or_symm
|
||||
""
|
||||
(P Q : Prop) : P ∨ Q → Q ∨ P := by
|
||||
intro h
|
||||
|
||||
@@ -15,7 +15,7 @@ Introduction
|
||||
|
||||
"
|
||||
|
||||
Statement and_or_distrib_left
|
||||
Statement --and_or_distrib_left
|
||||
""
|
||||
(P Q R : Prop) : P ∧ (Q ∨ R) ↔ (P ∧ Q) ∨ (P ∧ R) := by
|
||||
constructor
|
||||
|
||||
@@ -17,7 +17,7 @@ Introduction
|
||||
|
||||
"
|
||||
|
||||
Statement contra
|
||||
Statement --contra
|
||||
""
|
||||
(P Q : Prop) : (P ∧ ¬ P) → Q := by
|
||||
intro h
|
||||
|
||||
Reference in New Issue
Block a user