Skip to content

Commit

Permalink
Resolve two test TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrossel committed Apr 18, 2024
1 parent e4c70ad commit b2b05e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions Lean/Egg/Tests/Classes.lean
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Egg

-- TODO: What is this testing?
-- This tests how type class arguments are encoded in rewrites and matched against expressions.

variable (thm : {α : Type _} → [Add α] → (a b : α) → a + b = b + a)

-- TODO: It feels like this is related to universe levels.
example {a b : Nat} : a + b = b + a := by
sorry -- egg [thm]
egg [thm]
2 changes: 1 addition & 1 deletion Lean/Egg/Tests/Freshman.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ theorem freshmans_dream₃ : (x + y) ^ 3 = x ^ 3 + x * y ^ 2 + x ^ 2 * y + y ^ 3
_ = x ^ 3 + x * y ^ 2 + x ^ 2 * y + y ^ 3 := by char_two_ring

theorem freshmans_dream₃' : (x + y) ^ 3 = x ^ 3 + x * y ^ 2 + x ^ 2 * y + y ^ 3 := by
char_two_ring
char_two_ring
5 changes: 2 additions & 3 deletions Lean/Egg/Tests/From.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ example (a b : Nat) (h : a = b) : a = b := by
example (a b c : Nat) (h₁ : a = b) (h₂ : b = c) : a = c := by
egg [h₂] from h₁

-- TODO: Removing the last `p` in the goal causes 'maximum recursion depth has been reached'.
example (h : p ∧ q ∧ r) (assoc : ∀ a b c, (a ∧ b) ∧ c ↔ a ∧ (b ∧ c)) (idem : ∀ a, a ↔ a ∧ a) :
r ∧ r ∧ q ∧ p ∧ q ∧ r ∧ p := by
variable (assoc : ∀ a b c, (a ∧ b) ∧ c ↔ a ∧ (b ∧ c)) (idem : ∀ a, a ↔ a ∧ a) in
example (h : p ∧ q ∧ r) : r ∧ r ∧ q ∧ p ∧ q ∧ r ∧ p := by
egg [And.comm, assoc, idem] from h

example (P : Nat → Prop) (hp : P Nat.zero.succ) (h : ∀ n, P n ↔ P n.succ) :
Expand Down

0 comments on commit b2b05e9

Please sign in to comment.