Skip to content

Commit

Permalink
Resolve issues related to the update (mem got swapped + ignore unused…
Browse files Browse the repository at this point in the history
… variables)
  • Loading branch information
eyihluyc committed Sep 12, 2024
1 parent efca456 commit 40a1f9b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Minimal/ARS.lean
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ theorem decr {a b c} (ab : r a b) (b_c : ReflTransGen r b c)
| .head _ _ => by
simp [ReflTransGen.size]

set_option linter.unusedVariables false
def z_confluence
(z : ZProperty r)
{a b c : α}
Expand Down Expand Up @@ -187,3 +188,4 @@ def z_implies_confluence
(z : ZProperty r)
: Confluence r
:= λ _ _ _ ab ac => z_confluence z ab ac
set_option linter.unusedVariables true
8 changes: 4 additions & 4 deletions Minimal/Record.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ inductive Record (α : Type u) : List String → Type u where
→ Record α (key :: keys)

-- value ∈ record
inductive Mem : {keys : List String} → (a : α) → Record α keysProp where
inductive Mem : {keys : List String} → Record α keys → (a : α)Prop where
| head
: {keys : List String}
→ {a : α}
→ {as : Record α keys}
→ (key : String)
→ (not_in : key ∉ keys)
→ Mem a (Record.cons key not_in a as)
→ Mem (Record.cons key not_in a as) a
| tail
: {keys : List String}
→ {a b : α}
→ {as : Record α keys}
→ (key : String)
→ (not_in : key ∉ keys)
→ Mem a as
→ Mem a (Record.cons key not_in b as)
→ Mem as a
→ Mem (Record.cons key not_in b as) a

instance {keys : List String} : Membership α (Record α keys) where
mem := Mem
Expand Down
2 changes: 1 addition & 1 deletion Minimal/Utils.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ theorem notEqByListMem
: a ≠ b
:= λ eq =>
let memEq : List.Mem a lst = List.Mem b lst :=
congrArg (λ x => Membership.mem x lst) eq
congrArg (λ x => Membership.mem lst x) eq
b_not_in (Eq.mp memEq a_is_in)

0 comments on commit 40a1f9b

Please sign in to comment.