Skip to content

Commit

Permalink
the tactic of tactics
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Oct 15, 2023
1 parent 3333a85 commit 1dbfaae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Game/Levels/Power/L10FLT.lean
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ and which explains how to work with many more mathematical concepts in Lean.
$$(a+1)^{n+3}+(b+1)^{n+3}\not=(c+1)^{n+3}.$$ -/
Statement
(a b c n : ℕ) : (a + 1) ^ (n + 3) + (b + 1) ^ (n + 3) ≠ (c + 1) ^ (n + 3) := by
sorry
IGiveUp

NewHiddenTactic IGiveUp
LemmaTab "Pow"

Conclusion
"
Congratulations! You have proved Fermat's Last Theorem!
Well, or maybe, you just hacked the game...
"
2 changes: 2 additions & 0 deletions Game/Metadata.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ import Game.Doc.Tactics
import Mathlib.Tactic

import Game.Tactic.Induction
import Game.Tactic.Cases
import Game.Tactic.Rfl
import Game.Tactic.Rw
import Game.Tactic.Apply
import Game.Tactic.IGiveUp
-- import Std.Tactic.RCases
-- import Game.Tactic.Have
-- import Game.Tactic.LeftRight
Expand Down
12 changes: 12 additions & 0 deletions Game/Tactic/IGiveUp.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Lean

universe u

@[never_extract]
axiom iGiveUpAx (α : Sort u) (synthetic := false) : α

/--
`IGiveUp` behaves like `sorry`, except that it is the ultimative cheat code:
The game won't complain - or notice - if you proof anything with `IGiveUp`.
-/
macro "IGiveUp" : tactic => `(tactic| exact @iGiveUpAx _ false)

0 comments on commit 1dbfaae

Please sign in to comment.