internlm/Lean-Github huggingface dataset:
Theorem: SSAScope.get_set_ne_type
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
⊢ get v (set v τ' val (head :: tail)) τ = none
Tactic:
simp
Proof state after:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
⊢ get v (if head.fst = v then (head.fst, { fst := τ', snd := val }) :: tail else head :: set v τ' val tail) τ = none
Theorem: SSAScope.get_set_ne_type
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
⊢ get v (if head.fst = v then (head.fst, { fst := τ', snd := val }) :: tail else head :: set v τ' val tail) τ = none
Tactic:
byCases H: head.fst = v
Proof state after:
case cons.h1
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get head.fst (set head.fst τ' val tail) τ = none
⊢ τ' = τ → False

case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
H : ¬head.fst = v
⊢ get v (set v τ' val tail) τ = none
Theorem: SSAScope.get_set_ne_type
Proof state before:
case cons.h1
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get head.fst (set head.fst τ' val tail) τ = none
⊢ τ' = τ → False

case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
H : ¬head.fst = v
⊢ get v (set v τ' val tail) τ = none
Tactic:
. simp [Hne]
Proof state after:
case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
H : ¬head.fst = v
⊢ get v (set v τ' val tail) τ = none
Theorem: SSAScope.get_set_ne_type
Proof state before:
case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
H : ¬head.fst = v
⊢ get v (set v τ' val tail) τ = none
Tactic:
. byCases H2: head.fst = v <;> try assumption
Proof state after:
no goals
Theorem: SSAScope.get_set_ne_type
Proof state before:
case cons.h2.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
τ τ' : MLIRType δ
Hne : τ' ≠ τ
v : SSAVal
val : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : get v (set v τ' val tail) τ = none
H H2 : ¬head.fst = v
⊢ get v (set v τ' val tail) τ = none
Tactic:
assumption
Proof state after:
no goals
Theorem: SSAScope.get_set_eq
Proof state before:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
scope : SSAScope δ
τ : MLIRType δ
val : MLIRType.eval τ
⊢ get v (set v τ val scope) τ = some val
Tactic:
induction scope with
| nil => simp;
| cons head nil =>
  simp
  byCases H: head.fst = v <;> try apply cast_eq
  assumption
Proof state after:
no goals
Theorem: SSAScope.get_set_eq
Proof state before:
case nil
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
⊢ get v (set v τ val []) τ = some val
Tactic:
simp
Proof state after:
no goals
Theorem: SSAScope.get_set_eq
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
nil : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : get v (set v τ val nil) τ = some val
⊢ get v (set v τ val (head :: nil)) τ = some val
Tactic:
simp
Proof state after:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
nil : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : get v (set v τ val nil) τ = some val
⊢ get v (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: nil else head :: set v τ val nil) τ = some val
Theorem: SSAScope.get_set_eq
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
nil : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : get v (set v τ val nil) τ = some val
⊢ get v (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: nil else head :: set v τ val nil) τ = some val
Tactic:
byCases H: head.fst = v <;> try apply cast_eq
Proof state after:
case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
nil : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : get v (set v τ val nil) τ = some val
H : ¬head.fst = v
⊢ get v (set v τ val nil) τ = some val
Theorem: SSAScope.get_set_eq
Proof state before:
case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
nil : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : get v (set v τ val nil) τ = some val
H : ¬head.fst = v
⊢ get v (set v τ val nil) τ = some val
Tactic:
assumption
Proof state after:
no goals
Theorem: SSAScope.set_commutes
Proof state before:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
⊢ v' ≠ v →
    ∀ ⦃scope : SSAScope δ⦄ ⦃τ τ' : MLIRType δ⦄ ⦃val : MLIRType.eval τ⦄ ⦃val' : MLIRType.eval τ'⦄,
      equiv (set v τ val (set v' τ' val' scope)) (set v' τ' val' (set v τ val scope))
Tactic:
intros Hne scope τ τ' val val'
Proof state after:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
scope : SSAScope δ
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
⊢ equiv (set v τ val (set v' τ' val' scope)) (set v' τ' val' (set v τ val scope))
Theorem: SSAScope.set_commutes
Proof state before:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
scope : SSAScope δ
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
⊢ equiv (set v τ val (set v' τ' val' scope)) (set v' τ' val' (set v τ val scope))
Tactic:
induction scope with
| nil =>
  simp; simp [Hne, Hne.symm]
  simp [equiv]; intros name τ''
  byCases Hv: v' = name
  byCases Hτ: τ' = τ'' <;> simp [Hne.symm]
| cons head tail Hind =>
  simp [equiv] at *
  intros name; specialize Hind name
  simp at *
  byCases Hv': head.fst = v' <;> simp [Hne]
  byCases Hv: head.fst = v <;> simp [Hv']
  byCases Hname: head.fst = name <;> assumption
Proof state after:
no goals
Theorem: SSAScope.set_commutes
Proof state before:
case nil
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
⊢ equiv (set v τ val (set v' τ' val' [])) (set v' τ' val' (set v τ val []))
Tactic:
simp
Proof state after:
case nil
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
⊢ equiv
    (if v' = v then [(v', { fst := τ, snd := val })]
    else [(v', { fst := τ', snd := val' }), (v, { fst := τ, snd := val })])
    (if v = v' then [(v, { fst := τ', snd := val' })]
    else [(v, { fst := τ, snd := val }), (v', { fst := τ', snd := val' })])
Theorem: SSAScope.set_commutes
Proof state before:
case nil
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
⊢ equiv
    (if v' = v then [(v', { fst := τ, snd := val })]
    else [(v', { fst := τ', snd := val' }), (v, { fst := τ, snd := val })])
    (if v = v' then [(v, { fst := τ', snd := val' })]
    else [(v, { fst := τ, snd := val }), (v', { fst := τ', snd := val' })])
Tactic:
simp [Hne, Hne.symm]
Proof state after:
case nil
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
⊢ equiv [(v', { fst := τ', snd := val' }), (v, { fst := τ, snd := val })]
    [(v, { fst := τ, snd := val }), (v', { fst := τ', snd := val' })]
Theorem: SSAScope.set_commutes
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind : equiv (set v τ val (set v' τ' val' tail)) (set v' τ' val' (set v τ val tail))
⊢ equiv (set v τ val (set v' τ' val' (head :: tail))) (set v' τ' val' (set v τ val (head :: tail)))
Tactic:
simp [equiv] at *
Proof state after:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind :
  ∀ (name : SSAVal) (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
⊢ ∀ (name : SSAVal) (τ_1 : MLIRType δ),
    get name
        (set v τ val
          (if head.fst = v' then (head.fst, { fst := τ', snd := val' }) :: tail else head :: set v' τ' val' tail))
        τ_1 =
      get name
        (set v' τ' val'
          (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail))
        τ_1
Theorem: SSAScope.set_commutes
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind :
  ∀ (name : SSAVal) (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
⊢ ∀ (name : SSAVal) (τ_1 : MLIRType δ),
    get name
        (set v τ val
          (if head.fst = v' then (head.fst, { fst := τ', snd := val' }) :: tail else head :: set v' τ' val' tail))
        τ_1 =
      get name
        (set v' τ' val'
          (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail))
        τ_1
Tactic:
intros name
Proof state after:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind :
  ∀ (name : SSAVal) (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
name : SSAVal
⊢ ∀ (τ_1 : MLIRType δ),
    get name
        (set v τ val
          (if head.fst = v' then (head.fst, { fst := τ', snd := val' }) :: tail else head :: set v' τ' val' tail))
        τ_1 =
      get name
        (set v' τ' val'
          (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail))
        τ_1
Theorem: SSAScope.set_commutes
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
Hind :
  ∀ (name : SSAVal) (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
name : SSAVal
⊢ ∀ (τ_1 : MLIRType δ),
    get name
        (set v τ val
          (if head.fst = v' then (head.fst, { fst := τ', snd := val' }) :: tail else head :: set v' τ' val' tail))
        τ_1 =
      get name
        (set v' τ' val'
          (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail))
        τ_1
Tactic:
specialize Hind name
Proof state after:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
name : SSAVal
Hind :
  ∀ (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
⊢ ∀ (τ_1 : MLIRType δ),
    get name
        (set v τ val
          (if head.fst = v' then (head.fst, { fst := τ', snd := val' }) :: tail else head :: set v' τ' val' tail))
        τ_1 =
      get name
        (set v' τ' val'
          (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail))
        τ_1
Theorem: SSAScope.set_commutes
Proof state before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
name : SSAVal
Hind :
  ∀ (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
⊢ ∀ (τ_1 : MLIRType δ),
    get name
        (set v τ val
          (if head.fst = v' then (head.fst, { fst := τ', snd := val' }) :: tail else head :: set v' τ' val' tail))
        τ_1 =
      get name
        (set v' τ' val'
          (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail))
        τ_1
Tactic:
byCases Hv': head.fst = v' <;> simp [Hne]
Proof state after:
case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
name : SSAVal
Hind :
  ∀ (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
Hv' : ¬head.fst = v'
⊢ ∀ (τ_1 : MLIRType δ),
    get name
        (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: set v' τ' val' tail
        else head :: set v τ val (set v' τ' val' tail))
        τ_1 =
      get name
        (set v' τ' val'
          (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail))
        τ_1
Theorem: SSAScope.set_commutes
Proof state before:
case cons.h2.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : ¬v' = v
τ τ' : MLIRType δ
val : MLIRType.eval τ
val' : MLIRType.eval τ'
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
name : SSAVal
Hind :
  ∀ (τ_1 : MLIRType δ),
    get name (set v τ val (set v' τ' val' tail)) τ_1 = get name (set v' τ' val' (set v τ val tail)) τ_1
Hv' : ¬head.fst = v'
Hv : ¬head.fst = v
⊢ ∀ (τ_1 : MLIRType δ),
    (if head.fst = name then
        if h : head.2.fst = τ_1 then
          some
            (cast
              (_ :
                (match head.2.fst with
                  | MLIRType.float a => Float
                  | MLIRType.int signedness sz => FinInt sz
                  | MLIRType.tensor1d => Tensor1D
                  | MLIRType.tensor2d => Tensor2D
                  | MLIRType.tensor4d => Tensor4D
                  | MLIRType.index => ℤ
                  | MLIRType.undefined a => Unit
                  | MLIRType.extended σ => ε✝ σ
                  | MLIRType.erased => Unit) =
                  match τ_1 with
                  | MLIRType.float a => Float
                  | MLIRType.int signedness sz => FinInt sz
                  | MLIRType.tensor1d => Tensor1D
                  | MLIRType.tensor2d => Tensor2D
                  | MLIRType.tensor4d => Tensor4D
                  | MLIRType.index => ℤ
                  | MLIRType.undefined a => Unit
                  | MLIRType.extended σ => ε✝ σ
                  | MLIRType.erased => Unit)
              head.2.snd)
        else none
      else get name (set v τ val (set v' τ' val' tail)) τ_1) =
      if head.fst = name then
        if h : head.2.fst = τ_1 then
          some
            (cast
              (_ :
                (match head.2.fst with
                  | MLIRType.float a => Float
                  | MLIRType.int signedness sz => FinInt sz
                  | MLIRType.tensor1d => Tensor1D
                  | MLIRType.tensor2d => Tensor2D
                  | MLIRType.tensor4d => Tensor4D
                  | MLIRType.index => ℤ
                  | MLIRType.undefined a => Unit
                  | MLIRType.extended σ => ε✝ σ
                  | MLIRType.erased => Unit) =
                  match τ_1 with
                  | MLIRType.float a => Float
                  | MLIRType.int signedness sz => FinInt sz
                  | MLIRType.tensor1d => Tensor1D
                  | MLIRType.tensor2d => Tensor2D
                  | MLIRType.tensor4d => Tensor4D
                  | MLIRType.index => ℤ
                  | MLIRType.undefined a => Unit
                  | MLIRType.extended σ => ε✝ σ
                  | MLIRType.erased => Unit)
              head.2.snd)
        else none
      else get name (set v' τ' val' (set v τ val tail)) τ_1
Tactic:
byCases Hname: head.fst = name <;> assumption
Proof state after:
no goals
Theorem: SSAEnv.equiv_rfl
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env : SSAEnv δ
⊢ equiv env env
Tactic:
intros v τ
Proof state after:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env : SSAEnv δ
v : SSAVal
τ : MLIRType δ
⊢ get v τ env = get v τ env
Theorem: SSAEnv.equiv_rfl
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env : SSAEnv δ
v : SSAVal
τ : MLIRType δ
⊢ get v τ env = get v τ env
Tactic:
rfl
Proof state after:
no goals
Theorem: SSAEnv.equiv_symm
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env env' : SSAEnv δ
⊢ equiv env env' → equiv env' env
Tactic:
intros H name
Proof state after:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env env' : SSAEnv δ
H : equiv env env'
name : SSAVal
⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
Theorem: SSAEnv.equiv_symm
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env env' : SSAEnv δ
H : equiv env env'
name : SSAVal
⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
Tactic:
specialize H name
Proof state after:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env env' : SSAEnv δ
name : SSAVal
H : ∀ (τ : MLIRType δ), get name τ env = get name τ env'
⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
Theorem: SSAEnv.equiv_symm
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env env' : SSAEnv δ
name : SSAVal
H : ∀ (τ : MLIRType δ), get name τ env = get name τ env'
⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
Tactic:
simp [H]
Proof state after:
no goals
Theorem: SSAEnv.equiv_trans
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
⊢ ∀ ⦃env₁ env₂ : SSAEnv δ⦄, equiv env₁ env₂ → ∀ ⦃env₃ : SSAEnv δ⦄, equiv env₂ env₃ → equiv env₁ env₃
Tactic:
intros _ _ H1 _ H2 name
Proof state after:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env₁✝ env₂✝ : SSAEnv δ
H1 : equiv env₁✝ env₂✝
env₃✝ : SSAEnv δ
H2 : equiv env₂✝ env₃✝
name : SSAVal
⊢ ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₃✝
Theorem: SSAEnv.equiv_trans
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env₁✝ env₂✝ : SSAEnv δ
H1 : equiv env₁✝ env₂✝
env₃✝ : SSAEnv δ
H2 : equiv env₂✝ env₃✝
name : SSAVal
⊢ ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₃✝
Tactic:
specialize H1 name
Proof state after:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env₁✝ env₂✝ env₃✝ : SSAEnv δ
H2 : equiv env₂✝ env₃✝
name : SSAVal
H1 : ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₂✝
⊢ ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₃✝
Theorem: SSAEnv.equiv_trans
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env₁✝ env₂✝ env₃✝ : SSAEnv δ
H2 : equiv env₂✝ env₃✝
name : SSAVal
H1 : ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₂✝
⊢ ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₃✝
Tactic:
specialize H2 name
Proof state after:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env₁✝ env₂✝ env₃✝ : SSAEnv δ
name : SSAVal
H1 : ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₂✝
H2 : ∀ (τ : MLIRType δ), get name τ env₂✝ = get name τ env₃✝
⊢ ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₃✝
Theorem: SSAEnv.equiv_trans
Proof state before:
α σ : Type
ε : σ → Type
δ : Dialect α σ ε
env₁✝ env₂✝ env₃✝ : SSAEnv δ
name : SSAVal
H1 : ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₂✝
H2 : ∀ (τ : MLIRType δ), get name τ env₂✝ = get name τ env₃✝
⊢ ∀ (τ : MLIRType δ), get name τ env₁✝ = get name τ env₃✝
Tactic:
simp [H1, H2]
Proof state after:
no goals
Theorem: SSAEnv.getT_set_ne
Proof state before:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
⊢ v' ≠ v → ∀ ⦃env : SSAEnv δ⦄ ⦃τ : MLIRType δ⦄ ⦃val : MLIRType.eval τ⦄, getT v (set v' τ val env) = getT v env
Tactic:
intros Hne env τ val
Proof state after:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
env : SSAEnv δ
τ : MLIRType δ
val : MLIRType.eval τ
⊢ getT v (set v' τ val env) = getT v env
Theorem: SSAEnv.getT_set_ne
Proof state before:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
env : SSAEnv δ
τ : MLIRType δ
val : MLIRType.eval τ
⊢ getT v (set v' τ val env) = getT v env
Tactic:
cases env with
| One s =>
  simp [getT, set]
  rw [SSAScope.getT_set_ne]
  assumption
| Cons head tail =>
  simp [getT, set, HOrElse.hOrElse, OrElse.orElse, Option.orElse]
  rw [SSAScope.getT_set_ne]
  assumption
Proof state after:
no goals
Theorem: SSAEnv.getT_set_ne
Proof state before:
case One
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
τ : MLIRType δ
val : MLIRType.eval τ
s : SSAScope δ
⊢ getT v (set v' τ val (One s)) = getT v (One s)
Tactic:
simp [getT, set]
Proof state after:
case One
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v v' : SSAVal
Hne : v' ≠ v
τ : MLIRType δ
val : MLIRType.eval τ
s : SSAScope δ
⊢ SSAScope.getT v (SSAScope.set v' τ val s) = SSAScope.getT v s