Theorem: SSAScope.getT_set_eq (MLIR/Semantics/SSAEnv.lean)

State before:
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
scope : SSAScope δ
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
⊢ getT v (set v τ val scope) = some { fst := τ, snd := val }
Tactic:
induction scope with
| nil => simp
| cons head tail =>
  simp
  byCases H: head.fst = v
  assumption
State after:
no goals

State before:
case nil
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
⊢ getT v (set v τ val []) = some { fst := τ, snd := val }
Tactic:
simp
State after:
no goals

State before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : getT v (set v τ val tail) = some { fst := τ, snd := val }
⊢ getT v (set v τ val (head :: tail)) = some { fst := τ, snd := val }
Tactic:
simp
State after:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : getT v (set v τ val tail) = some { fst := τ, snd := val }
⊢ getT v (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail) =
    some { fst := τ, snd := val }

State before:
case cons
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : getT v (set v τ val tail) = some { fst := τ, snd := val }
⊢ getT v (if head.fst = v then (head.fst, { fst := τ, snd := val }) :: tail else head :: set v τ val tail) =
    some { fst := τ, snd := val }
Tactic:
byCases H: head.fst = v
State after:
case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : getT v (set v τ val tail) = some { fst := τ, snd := val }
H : ¬head.fst = v
⊢ getT v (set v τ val tail) = some { fst := τ, snd := val }

State before:
case cons.h2
α σ : Type
ε : σ → Type
α✝ σ✝ : Type
ε✝ : σ✝ → Type
δ : Dialect α✝ σ✝ ε✝
v : SSAVal
τ : MLIRType δ
val : MLIRType.eval τ
head : SSAVal × (τ : MLIRType δ) × MLIRType.eval τ
tail : List (SSAVal × (τ : MLIRType δ) × MLIRType.eval τ)
tail_ih✝ : getT v (set v τ val tail) = some { fst := τ, snd := val }
H : ¬head.fst = v
⊢ getT v (set v τ val tail) = some { fst := τ, snd := val }
Tactic:
assumption
State after:
no goals