use full jsonrpc protocol
This commit is contained in:
@@ -63,12 +63,13 @@ Start by casting `induction_on n`.
|
||||
"
|
||||
|
||||
Statement (n : ℕ) : 0 + n = n := by
|
||||
induction_on n
|
||||
rewrite [add_zero]
|
||||
rfl
|
||||
rewrite [add_succ]
|
||||
rewrite [ind_hyp]
|
||||
rfl
|
||||
sorry
|
||||
-- induction_on n
|
||||
-- rewrite [add_zero]
|
||||
-- rfl
|
||||
-- rewrite [add_succ]
|
||||
-- rewrite [ind_hyp]
|
||||
-- rfl
|
||||
|
||||
Message : (0 : ℕ) + 0 = 0 => "
|
||||
We now have *two goals!* The
|
||||
|
||||
@@ -16,5 +16,5 @@ axiom add_zero : ∀ a : ℕ, a + 0 = a
|
||||
|
||||
axiom add_succ : ∀ a b : ℕ, a + succ b = succ (a + b)
|
||||
|
||||
@[elabAsElim] axiom myInduction {P : ℕ → Prop} (n : ℕ) (h₀ : P 0) (h : ∀ n, P n → P (succ n)) : P n
|
||||
@[elab_as_elim] axiom myInduction {P : ℕ → Prop} (n : ℕ) (h₀ : P 0) (h : ∀ n, P n → P (succ n)) : P n
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@ elab "swap" : tactic => do
|
||||
| g₁::g₂::t => setGoals (g₂::g₁::t)
|
||||
| _ => pure ()
|
||||
|
||||
macro "induction_on" n:ident : tactic =>
|
||||
`(tactic| refine myInduction $n ?base ?inductive_step; swap; clear $n; intro $n $(mkIdent `ind_hyp); swap)
|
||||
-- macro "induction_on" n:ident : tactic =>
|
||||
-- `(tactic| refine myInduction $n ?base ?inductive_step; swap; clear $n; intro $n $(mkIdent `ind_hyp); swap)
|
||||
@@ -5,5 +5,5 @@ require GameServer from ".."/"leanserver"
|
||||
|
||||
package TestGame
|
||||
|
||||
@[defaultTarget]
|
||||
@[default_target]
|
||||
lean_lib TestGame
|
||||
|
||||
@@ -1 +1 @@
|
||||
leanprover/lean4:nightly-2022-09-23
|
||||
leanprover/lean4:nightly-2022-10-29
|
||||
|
||||
Reference in New Issue
Block a user