Skip to content

Commit

Permalink
Change guide syntax to 'using'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrossel committed Apr 12, 2024
1 parent d83ed78 commit e78fe93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Lean/Egg/Tactic/Guides.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ open Lean Elab Tactic
namespace Egg.Guides

declare_syntax_cat egg_guides
syntax " via " (term,*) : egg_guides
syntax &" using " (term,*) : egg_guides

def parseGuides : TSyntax `egg_guides → TacticM Guides
| `(egg_guides|via $gs,*) => do
| `(egg_guides|using $gs,*) => do
let mut guides : Guides := #[]
for g in gs.getElems, idx in [:gs.getElems.size] do
let guide ← Guide.from (← Tactic.elabTerm g none) (.guide idx)
Expand Down
4 changes: 2 additions & 2 deletions Lean/Egg/Tests/Groups.lean
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ theorem inv_inv : -(-a) = a := by
_ = _ := by group

theorem neg_add' : -(a + b) = -b + -a := by
group via -b + -a + (a + b) + -(a + b)
group using -a + (a + b) + -(a + b)

-- BUG: Try adding a hypothesis. This should cause the backend to crash.
theorem inv_inv' : -(-a) = a := by
group via -(-a) + (-a + a)
group using (-a + a)

0 comments on commit e78fe93

Please sign in to comment.