@@ -21,8 +21,10 @@ partial def seqsolve (goal : MVarId) : TacticM Bool :=
2121 return true
2222
2323 /- R∧, R∨ -/
24- if ← matchConstInduct goalType.getAppFn
25- (fun _ => return false )
24+ /- TODO: Match on ∧, ∨ -/
25+ /- TODO: Success flag -/
26+ matchConstInduct goalType.getAppFn
27+ (fun _ => return )
2628 fun ival us => do
2729 for ctor in ival.ctors do
2830 try
@@ -31,18 +33,14 @@ partial def seqsolve (goal : MVarId) : TacticM Bool :=
3133 newGoals.forM $ fun newGoal => do
3234 if not $ ← seqsolve newGoal then
3335 failure
34- return true /- TODO: This doesn't actually return -/
3536 catch _ =>
3637 pure ()
37- return false
38- then
39- return true
38+ return
4039
4140 /- L→ -/
4241
43- /- L∧ -/
44-
45- /- L∨ -/
42+ /- L∧, L∨ -/
43+ /- TODO: Apply cases where possible -/
4644
4745 return false
4846
@@ -52,17 +50,23 @@ elab "seqsolve" : tactic =>
5250 goals.forM $ fun goal => do
5351 let _ ← seqsolve goal
5452
55- example {φ : Prop } : φ → φ := by
53+ variable {φ ψ : Prop }
54+
55+ example : φ → φ := by
56+ seqsolve
57+
58+ example (h : φ) : φ := by
5659 seqsolve
5760
58- example {φ : Prop } (h : φ) : φ := by
61+ example : False → φ := by
5962 seqsolve
6063
61- example {φ : Prop } : False → φ := by
64+ example : (φ → φ) ∧ (φ → φ) := by
6265 seqsolve
6366
64- example {φ : Prop } : (φ → φ) ∧ (φ → φ) := by
67+ example : False ∨ (φ → φ) := by
6568 seqsolve
6669
67- example {φ : Prop } : False ∨ (φ → φ) := by
70+ example (h : φ ∧ ψ) : ψ := by
71+ cases h
6872 seqsolve
0 commit comments