named Statements are added to context with there specified name

This commit is contained in:
Jon Eugster
2023-04-14 10:48:46 +02:00
parent 0560c0100b
commit b1dc4d71b3
12 changed files with 37 additions and 73 deletions
@@ -2,6 +2,7 @@ import Adam.Metadata
import Std.Tactic.RCases
import Adam.ToBePorted
import Adam.Levels.Predicate.L06_Exists
Game "Adam"
World "Contradiction"
@@ -53,7 +54,6 @@ Statement (n : ℕ) (h : Odd (n ^ 2)): Odd n := by
`even_square` anwenden!"
apply even_square
NewLemma even_square
NewTactic contrapose
DisabledTactic by_contra
LemmaTab "Nat"
@@ -1,6 +1,8 @@
import Adam.Metadata
import Adam.ToBePorted
import Adam.Levels.Predicate.L06_Exists
Game "Adam"
World "Contradiction"
@@ -3,6 +3,8 @@ import Adam.Metadata
import Adam.ToBePorted
import Adam.Options.MathlibPart
import Adam.Levels.Sum.L03_ArithSum
Game "Adam"
World "Sum"
Level 4
+1 -1
View File
@@ -3,7 +3,7 @@ import Adam.Metadata
import Adam.ToBePorted
import Adam.Options.MathlibPart
import Adam.Options.ArithSum
import Adam.Levels.Sum.L04_SumOdd
set_option tactic.hygienic false
+2 -2
View File
@@ -3,7 +3,7 @@ import Adam.Metadata
import Adam.ToBePorted
import Adam.Options.MathlibPart
import Adam.Options.ArithSum
import Adam.Levels.Sum.L05_SumComm
Game "Adam"
World "Sum"
@@ -82,7 +82,7 @@ Statement (m : ℕ) : (∑ i : Fin (m + 1), (i : ℕ)^3) = (∑ i : Fin (m + 1),
Hint "**Du**: Jetzt sollten es eigentlich nur noch arithmetische Operationen sein."
ring
NewLemma arithmetic_sum add_pow_two
NewLemma add_pow_two
LemmaTab "Sum"
Conclusion "Der Golem denkt ganz lange nach, und ihr bekommt das Gefühl, dass er gar nie
-13
View File
@@ -1,13 +0,0 @@
import Adam.Options.MathlibPart
open BigOperators
lemma arithmetic_sum (n : ℕ) : 2 * (∑ i : Fin (n + 1), ↑i) = n * (n + 1) := by
induction' n with n hn
simp
rw [Fin.sum_univ_castSucc]
rw [mul_add]
simp
rw [mul_add, hn]
simp_rw [Nat.succ_eq_one_add]
ring
-6
View File
@@ -29,12 +29,6 @@ def delabFinsetSum : Delab := do
-- lemma not_even {n : ℕ} : ¬ Even n ↔ Odd n := by
-- sorry
lemma even_square (n : ℕ) : Even n → Even (n ^ 2) := by
intro ⟨x, hx⟩
unfold Even at *
use 2 * x ^ 2
rw [hx]
ring
-- section powerset