url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_ne_type
[207, 1]
[218, 50]
simp
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_ne_type
[207, 1]
[218, 50]
byCases H: head.fst = v
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_ne_type
[207, 1]
[218, 50]
. simp [Hne]
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_ne_type
[207, 1]
[218, 50]
. byCases H2: head.fst = v <;> try assumption
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
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_ne_type
[207, 1]
[218, 50]
assumption
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
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_eq
[220, 1]
[227, 15]
induction scope with | nil => simp; | cons head nil => simp byCases H: head.fst = v <;> try apply cast_eq assumption
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal scope : SSAScope δ τ : MLIRType δ val : MLIRType.eval τ ⊢ get v (set v τ val scope) τ = some val
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_eq
[220, 1]
[227, 15]
simp
case nil α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ ⊢ get v (set v τ val []) τ = some val
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_eq
[220, 1]
[227, 15]
simp
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_eq
[220, 1]
[227, 15]
byCases H: head.fst = v <;> try apply cast_eq
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.get_set_eq
[220, 1]
[227, 15]
assumption
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
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
intros Hne scope τ τ' val val'
α σ : 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))
α σ : 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))
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
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
α σ : 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))
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
simp
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 []))
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' })])
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
simp [Hne, Hne.symm]
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' })])
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' })]
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
simp [equiv]
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' })]
case nil α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' ⊢ ∀ (name : SSAVal) (τ_1 : MLIRType δ), (if v' = name then if h : τ' = τ_1 then some (cast (_ : (match τ' 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) val') else none else if v = name then if h : τ = τ_1 then some (cast (_ : (match τ 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) val) else none else none) = if v = name then if h : τ = τ_1 then some (cast (_ : (match τ 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) val) else none else if v' = name then if h : τ' = τ_1 then some (cast (_ : (match τ' 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) val') else none else none
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
intros name τ''
case nil α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' ⊢ ∀ (name : SSAVal) (τ_1 : MLIRType δ), (if v' = name then if h : τ' = τ_1 then some (cast (_ : (match τ' 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) val') else none else if v = name then if h : τ = τ_1 then some (cast (_ : (match τ 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) val) else none else none) = if v = name then if h : τ = τ_1 then some (cast (_ : (match τ 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) val) else none else if v' = name then if h : τ' = τ_1 then some (cast (_ : (match τ' 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) val') else none else none
case nil α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' name : SSAVal τ'' : MLIRType δ ⊢ (if v' = name then if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none else if v = name then if h : τ = τ'' then some (cast (_ : (match τ 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 τ'' 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) val) else none else none) = if v = name then if h : τ = τ'' then some (cast (_ : (match τ 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 τ'' 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) val) else none else if v' = name then if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none else none
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
byCases Hv: v' = name
case nil α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' name : SSAVal τ'' : MLIRType δ ⊢ (if v' = name then if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none else if v = name then if h : τ = τ'' then some (cast (_ : (match τ 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 τ'' 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) val) else none else none) = if v = name then if h : τ = τ'' then some (cast (_ : (match τ 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 τ'' 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) val) else none else if v' = name then if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none else none
case nil.h1 α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' name : SSAVal τ'' : MLIRType δ Hne : name ≠ v ⊢ (if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none) = if v = name then if h : τ = τ'' then some (cast (_ : (match τ 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 τ'' 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) val) else none else if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
byCases Hτ: τ' = τ'' <;> simp [Hne.symm]
case nil.h1 α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' name : SSAVal τ'' : MLIRType δ Hne : name ≠ v ⊢ (if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none) = if v = name then if h : τ = τ'' then some (cast (_ : (match τ 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 τ'' 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) val) else none else if h : τ' = τ'' then some (cast (_ : (match τ' 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 τ'' 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) val') else none
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
simp [equiv] at *
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)))
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
intros name
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
specialize Hind name
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
byCases Hv': head.fst = v' <;> simp [Hne]
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
byCases Hv: head.fst = v <;> simp [Hv']
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
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAScope.set_commutes
[229, 1]
[246, 50]
byCases Hname: head.fst = name <;> assumption
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
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_rfl
[309, 1]
[310, 38]
intros v τ
α σ : Type ε : σ → Type δ : Dialect α σ ε env : SSAEnv δ ⊢ equiv env env
α σ : Type ε : σ → Type δ : Dialect α σ ε env : SSAEnv δ v : SSAVal τ : MLIRType δ ⊢ get v τ env = get v τ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_rfl
[309, 1]
[310, 38]
rfl
α σ : Type ε : σ → Type δ : Dialect α σ ε env : SSAEnv δ v : SSAVal τ : MLIRType δ ⊢ get v τ env = get v τ env
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_symm
[312, 1]
[316, 11]
intros H name
α σ : Type ε : σ → Type δ : Dialect α σ ε env env' : SSAEnv δ ⊢ equiv env env' → equiv env' env
α σ : Type ε : σ → Type δ : Dialect α σ ε env env' : SSAEnv δ H : equiv env env' name : SSAVal ⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_symm
[312, 1]
[316, 11]
specialize H name
α σ : Type ε : σ → Type δ : Dialect α σ ε env env' : SSAEnv δ H : equiv env env' name : SSAVal ⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
α σ : Type ε : σ → Type δ : Dialect α σ ε env env' : SSAEnv δ name : SSAVal H : ∀ (τ : MLIRType δ), get name τ env = get name τ env' ⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_symm
[312, 1]
[316, 11]
simp [H]
α σ : Type ε : σ → Type δ : Dialect α σ ε env env' : SSAEnv δ name : SSAVal H : ∀ (τ : MLIRType δ), get name τ env = get name τ env' ⊢ ∀ (τ : MLIRType δ), get name τ env' = get name τ env
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_trans
[318, 1]
[325, 16]
intros _ _ H1 _ H2 name
α σ : Type ε : σ → Type δ : Dialect α σ ε ⊢ ∀ ⦃env₁ env₂ : SSAEnv δ⦄, equiv env₁ env₂ → ∀ ⦃env₃ : SSAEnv δ⦄, equiv env₂ env₃ → equiv env₁ env₃
α σ : 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₃✝
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_trans
[318, 1]
[325, 16]
specialize H1 name
α σ : 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₃✝
α σ : 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₃✝
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_trans
[318, 1]
[325, 16]
specialize H2 name
α σ : 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₃✝
α σ : 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₃✝
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_trans
[318, 1]
[325, 16]
simp [H1, H2]
α σ : 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₃✝
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
intros Hne env τ val
α σ : 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
α σ : 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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
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
α σ : 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
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
simp [getT, set]
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)
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
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
rw [SSAScope.getT_set_ne]
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
case One.a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ : MLIRType δ val : MLIRType.eval τ s : SSAScope δ ⊢ v' ≠ v
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
assumption
case One.a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ : MLIRType δ val : MLIRType.eval τ s : SSAScope δ ⊢ v' ≠ v
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
simp [getT, set, HOrElse.hOrElse, OrElse.orElse, Option.orElse]
case Cons α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ getT v (set v' τ val (Cons head tail)) = getT v (Cons head tail)
case Cons α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ (match SSAScope.getT v (SSAScope.set v' τ val head), fun x => getT v tail with | some a, x => some a | none, b => b ()) = match SSAScope.getT v head, fun x => getT v tail with | some a, x => some a | none, b => b ()
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
rw [SSAScope.getT_set_ne]
case Cons α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ (match SSAScope.getT v (SSAScope.set v' τ val head), fun x => getT v tail with | some a, x => some a | none, b => b ()) = match SSAScope.getT v head, fun x => getT v tail with | some a, x => some a | none, b => b ()
case Cons.a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ v' ≠ v
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_ne
[327, 1]
[340, 15]
assumption
case Cons.a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ v' ≠ v
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_eq
[342, 1]
[350, 32]
cases env with | One s => simp [getT, set] rw [SSAScope.getT_set_eq] | Cons head tail => simp [getT, set, HOrElse.hOrElse, OrElse.orElse, Option.orElse] simp [SSAScope.getT_set_eq]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ env : SSAEnv δ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ ⊢ getT v (set v τ val env) = some { fst := τ, snd := val }
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_eq
[342, 1]
[350, 32]
simp [getT, set]
case One α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ s : SSAScope δ ⊢ getT v (set v τ val (One s)) = some { fst := τ, snd := val }
case One α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ s : SSAScope δ ⊢ SSAScope.getT v (SSAScope.set v τ val s) = some { fst := τ, snd := val }
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_eq
[342, 1]
[350, 32]
rw [SSAScope.getT_set_eq]
case One α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ s : SSAScope δ ⊢ SSAScope.getT v (SSAScope.set v τ val s) = some { fst := τ, snd := val }
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_eq
[342, 1]
[350, 32]
simp [getT, set, HOrElse.hOrElse, OrElse.orElse, Option.orElse]
case Cons α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ getT v (set v τ val (Cons head tail)) = some { fst := τ, snd := val }
case Cons α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ (match SSAScope.getT v (SSAScope.set v τ val head), fun x => getT v tail with | some a, x => some a | none, b => b ()) = some { fst := τ, snd := val }
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.getT_set_eq
[342, 1]
[350, 32]
simp [SSAScope.getT_set_eq]
case Cons α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal τ : MLIRType δ val : MLIRType.eval τ head : SSAScope δ tail : SSAEnv δ ⊢ (match SSAScope.getT v (SSAScope.set v τ val head), fun x => getT v tail with | some a, x => some a | none, b => b ()) = some { fst := τ, snd := val }
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_ne_val
[352, 1]
[359, 13]
intros Hne env τ τ' val
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal ⊢ v' ≠ v → ∀ ⦃env : SSAEnv δ⦄ ⦃τ τ' : MLIRType δ⦄ ⦃val : MLIRType.eval τ'⦄, get v τ (set v' τ' val env) = get v τ env
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ' ⊢ get v τ (set v' τ' val env) = get v τ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_ne_val
[352, 1]
[359, 13]
simp [get]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ' ⊢ get v τ (set v' τ' val env) = get v τ env
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ' ⊢ (match getT v (set v' τ' val env) with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none) = match getT v env with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_ne_val
[352, 1]
[359, 13]
rw [SSAEnv.getT_set_ne]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ' ⊢ (match getT v (set v' τ' val env) with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none) = match getT v env with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none
case a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ' ⊢ v' ≠ v
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_ne_val
[352, 1]
[359, 13]
assumption
case a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ' ⊢ v' ≠ v
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_eq_val
[361, 1]
[368, 26]
simp [H']
α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v : SSAVal val : MLIRType.eval τ' H' : τ' = τ ⊢ MLIRType.eval τ' = MLIRType.eval τ
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_eq_val
[361, 1]
[368, 26]
simp [get, getT_set_eq]
α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v : SSAVal val : MLIRType.eval τ' ⊢ get v τ (set v τ' val env) = if H' : τ' = τ then some (cast (_ : (match τ' 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 τ 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) val) else none
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set
[370, 1]
[383, 15]
simp [H]
α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v v' : SSAVal val : MLIRType.eval τ' H : τ' = τ ⊢ MLIRType.eval τ' = MLIRType.eval τ
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set
[370, 1]
[383, 15]
byCases H: v' = v
α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v v' : SSAVal val : MLIRType.eval τ' ⊢ get v τ (set v' τ' val env) = if v' = v then if H : τ' = τ then some (cast (_ : (match τ' 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 τ 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) val) else none else get v τ env
case h1 α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v : SSAVal val : MLIRType.eval τ' ⊢ get v τ (set v τ' val env) = if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) val) else none case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v v' : SSAVal val : MLIRType.eval τ' H : ¬v' = v ⊢ get v τ (set v' τ' val env) = get v τ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set
[370, 1]
[383, 15]
. simp [get_set_eq_val]
case h1 α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v : SSAVal val : MLIRType.eval τ' ⊢ get v τ (set v τ' val env) = if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) val) else none case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v v' : SSAVal val : MLIRType.eval τ' H : ¬v' = v ⊢ get v τ (set v' τ' val env) = get v τ env
case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v v' : SSAVal val : MLIRType.eval τ' H : ¬v' = v ⊢ get v τ (set v' τ' val env) = get v τ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set
[370, 1]
[383, 15]
. rw [get_set_ne_val] assumption
case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε τ τ' : MLIRType δ env : SSAEnv δ v v' : SSAVal val : MLIRType.eval τ' H : ¬v' = v ⊢ get v τ (set v' τ' val env) = get v τ env
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_eq
[385, 1]
[387, 26]
simp [get, getT_set_eq]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v : SSAVal env : SSAEnv δ τ : MLIRType δ val : MLIRType.eval τ ⊢ get v τ (set v τ val env) = some val
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_neq
[389, 1]
[392, 42]
simp[get]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal NEQ : v' ≠ v env : SSAEnv δ τ : MLIRType δ val : MLIRType.eval τ ⊢ get v τ (set v' τ val env) = get v τ env
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal NEQ : v' ≠ v env : SSAEnv δ τ : MLIRType δ val : MLIRType.eval τ ⊢ (match getT v (set v' τ val env) with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none) = match getT v env with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_neq
[389, 1]
[392, 42]
rw[SSAEnv.getT_set_ne]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal NEQ : v' ≠ v env : SSAEnv δ τ : MLIRType δ val : MLIRType.eval τ ⊢ (match getT v (set v' τ val env) with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none) = match getT v env with | none => none | some { fst := τ', snd := v' } => if h : τ' = τ then some (cast (_ : (match τ' 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 τ 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) v') else none
case a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal NEQ : v' ≠ v env : SSAEnv δ τ : MLIRType δ val : MLIRType.eval τ ⊢ v' ≠ v
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_neq
[389, 1]
[392, 42]
try assumption;
case a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal NEQ : v' ≠ v env : SSAEnv δ τ : MLIRType δ val : MLIRType.eval τ ⊢ v' ≠ v
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.get_set_neq
[389, 1]
[392, 42]
assumption
case a α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal NEQ : v' ≠ v env : SSAEnv δ τ : MLIRType δ val : MLIRType.eval τ ⊢ v' ≠ v
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_set
[394, 1]
[401, 15]
intros HEnv name τ v name' τ'
α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ ⊢ equiv env₁ env₂ → ∀ ⦃name : SSAVal⦄ ⦃τ : MLIRType δ⦄ ⦃v : MLIRType.eval τ⦄, equiv (set name τ v env₁) (set name τ v env₂)
α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ ⊢ get name' τ' (set name τ v env₁) = get name' τ' (set name τ v env₂)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_set
[394, 1]
[401, 15]
byCases Hname: name = name'
α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ ⊢ get name' τ' (set name τ v env₁) = get name' τ' (set name τ v env₂)
case h1 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ ⊢ get name' τ' (set name' τ v env₁) = get name' τ' (set name' τ v env₂) case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ Hname : ¬name = name' ⊢ get name' τ' (set name τ v env₁) = get name' τ' (set name τ v env₂)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_set
[394, 1]
[401, 15]
. simp [get_set_eq_val]
case h1 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ ⊢ get name' τ' (set name' τ v env₁) = get name' τ' (set name' τ v env₂) case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ Hname : ¬name = name' ⊢ get name' τ' (set name τ v env₁) = get name' τ' (set name τ v env₂)
case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ Hname : ¬name = name' ⊢ get name' τ' (set name τ v env₁) = get name' τ' (set name τ v env₂)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_set
[394, 1]
[401, 15]
. repeat rw [get_set_ne_val] <;> try assumption apply HEnv
case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ Hname : ¬name = name' ⊢ get name' τ' (set name τ v env₁) = get name' τ' (set name τ v env₂)
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_set
[394, 1]
[401, 15]
rw [get_set_ne_val] <;> try assumption
case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ Hname : ¬name = name' ⊢ get name' τ' env₁ = get name' τ' (set name τ v env₂)
case h2 α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ Hname : ¬name = name' ⊢ get name' τ' env₁ = get name' τ' env₂
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.equiv_set
[394, 1]
[401, 15]
assumption
case h2.a α σ : Type ε : σ → Type δ : Dialect α σ ε env₁ env₂ : SSAEnv δ HEnv : equiv env₁ env₂ name : SSAVal τ : MLIRType δ v : MLIRType.eval τ name' : SSAVal τ' : MLIRType δ Hname : ¬name = name' ⊢ name ≠ name'
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.set_commutes
[403, 1]
[412, 19]
intros Hne env τ τ' val val' v₂ τ₂
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal ⊢ v' ≠ v → ∀ ⦃env : SSAEnv δ⦄ ⦃τ τ' : MLIRType δ⦄ ⦃val : MLIRType.eval τ⦄ ⦃val' : MLIRType.eval τ'⦄, equiv (set v τ val (set v' τ' val' env)) (set v' τ' val' (set v τ val env))
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ ⊢ get v₂ τ₂ (set v τ val (set v' τ' val' env)) = get v₂ τ₂ (set v' τ' val' (set v τ val env))
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.set_commutes
[403, 1]
[412, 19]
repeat rw [get_set]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ ⊢ get v₂ τ₂ (set v τ val (set v' τ' val' env)) = get v₂ τ₂ (set v' τ' val' (set v τ val env))
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ ⊢ (if v = v₂ then if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none else if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else if v = v₂ then if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none else get v₂ τ₂ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.set_commutes
[403, 1]
[412, 19]
split
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ ⊢ (if v = v₂ then if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none else if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else if v = v₂ then if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none else get v₂ τ₂ env
case inl α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ h✝ : v = v₂ ⊢ (if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none case inr α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ h✝ : ¬v = v₂ ⊢ (if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.set_commutes
[403, 1]
[412, 19]
. subst v simp [Hne]
case inl α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ h✝ : v = v₂ ⊢ (if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none case inr α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ h✝ : ¬v = v₂ ⊢ (if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env
case inr α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ h✝ : ¬v = v₂ ⊢ (if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.set_commutes
[403, 1]
[412, 19]
. split <;> simp
case inr α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ h✝ : ¬v = v₂ ⊢ (if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
SSAEnv.set_commutes
[403, 1]
[412, 19]
rw [get_set]
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ ⊢ (if v = v₂ then if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none else if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ (set v τ val env)
α σ : Type ε : σ → Type α✝ σ✝ : Type ε✝ : σ✝ → Type δ : Dialect α✝ σ✝ ε✝ v v' : SSAVal Hne : v' ≠ v env : SSAEnv δ τ τ' : MLIRType δ val : MLIRType.eval τ val' : MLIRType.eval τ' v₂ : SSAVal τ₂ : MLIRType δ ⊢ (if v = v₂ then if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none else if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else get v₂ τ₂ env) = if v' = v₂ then if H : τ' = τ₂ then some (cast (_ : (match τ' 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 τ₂ 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) val') else none else if v = v₂ then if H : τ = τ₂ then some (cast (_ : (match τ 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 τ₂ 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) val) else none else get v₂ τ₂ env
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
interpSSA'_trigger_MemberSumL
[499, 9]
[503, 34]
simp [Fitree.trigger, pair_eta]
α σ : Type ε : σ → Type α' σ' : Type ε' : σ' → Type T : Type E : Type → Type Δ : Dialect α' σ' ε' e : SSAEnvE Δ T s₁ : SSAEnv Δ ⊢ interpSSA' (Fitree.trigger e) s₁ = SSAEnvE.handle T e s₁
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Semantics/SSAEnv.lean
interpSSA'_bind
[505, 1]
[510, 32]
apply Fitree.interpState_bind
α σ : Type ε : σ → Type E : Type → Type T R : Type δ : Dialect α σ ε t : Fitree (SSAEnvE δ +' E) T k : T → Fitree (SSAEnvE δ +' E) R s₁ : SSAEnv δ ⊢ interpSSA' (Fitree.bind t k) s₁ = Fitree.bind (interpSSA' t s₁) fun x => match x with | (x, s₂) => interpSSA' (k x) s₂
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
BubbleUpExtractSlice.bubble_up_extract_slice
[145, 1]
[151, 2]
cases t
M : Type → Type len : ℕ MM : Monad M LM : LawfulMonad M t : Tensor1D f : FinInt 32 → M (FinInt 32) ⊢ (fun s => Tensor1D.extract s len) <$> Tensor1D.mapM t f = Tensor1D.mapM (Tensor1D.extract t len) f
case mk M : Type → Type len : ℕ MM : Monad M LM : LawfulMonad M f : FinInt 32 → M (FinInt 32) size0✝ : ℕ data✝ : List (FinInt 32) h_data_size✝ : List.length data✝ = size0✝ ⊢ (fun s => Tensor1D.extract s len) <$> Tensor1D.mapM { size0 := size0✝, data := data✝, h_data_size := h_data_size✝ } f = Tensor1D.mapM (Tensor1D.extract { size0 := size0✝, data := data✝, h_data_size := h_data_size✝ } len) f
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
BubbleUpExtractSlice.bubble_up_extract_slice
[145, 1]
[151, 2]
sorry
case mk M : Type → Type len : ℕ MM : Monad M LM : LawfulMonad M f : FinInt 32 → M (FinInt 32) size0✝ : ℕ data✝ : List (FinInt 32) h_data_size✝ : List.length data✝ = size0✝ ⊢ (fun s => Tensor1D.extract s len) <$> Tensor1D.mapM { size0 := size0✝, data := data✝, h_data_size := h_data_size✝ } f = Tensor1D.mapM (Tensor1D.extract { size0 := size0✝, data := data✝, h_data_size := h_data_size✝ } len) f
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceFillCommuteOneD.extract_fill_commute
[181, 1]
[195, 3]
simp [Tensor1D.fill, Tensor1D.extract]
t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ Tensor1D.fill (Tensor1D.extract t extractlen) fillval = Tensor1D.extract (Tensor1D.fill t fillval) extractlen
t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.replicate (min extractlen t.size0) fillval = List.take extractlen (List.replicate t.size0 fillval)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceFillCommuteOneD.extract_fill_commute
[181, 1]
[195, 3]
apply List.extF
t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.replicate (min extractlen t.size0) fillval = List.take extractlen (List.replicate t.size0 fillval)
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ ∀ (n : ℕ) (h : n < List.length (List.replicate (min extractlen t.size0) fillval)), List.getF (List.replicate (min extractlen t.size0) fillval) n h = List.getF (List.take extractlen (List.replicate t.size0 fillval)) n (_ : n < List.length (List.take extractlen (List.replicate t.size0 fillval))) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceFillCommuteOneD.extract_fill_commute
[181, 1]
[195, 3]
intros n h
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ ∀ (n : ℕ) (h : n < List.length (List.replicate (min extractlen t.size0) fillval)), List.getF (List.replicate (min extractlen t.size0) fillval) n h = List.getF (List.take extractlen (List.replicate t.size0 fillval)) n (_ : n < List.length (List.take extractlen (List.replicate t.size0 fillval))) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 n : ℕ h : n < List.length (List.replicate (min extractlen t.size0) fillval) ⊢ List.getF (List.replicate (min extractlen t.size0) fillval) n h = List.getF (List.take extractlen (List.replicate t.size0 fillval)) n (_ : n < List.length (List.take extractlen (List.replicate t.size0 fillval))) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceFillCommuteOneD.extract_fill_commute
[181, 1]
[195, 3]
simp
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 n : ℕ h : n < List.length (List.replicate (min extractlen t.size0) fillval) ⊢ List.getF (List.replicate (min extractlen t.size0) fillval) n h = List.getF (List.take extractlen (List.replicate t.size0 fillval)) n (_ : n < List.length (List.take extractlen (List.replicate t.size0 fillval))) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 n : ℕ h : n < List.length (List.replicate (min extractlen t.size0) fillval) ⊢ List.getF (List.replicate (min extractlen t.size0) fillval) n h = List.getF (List.replicate t.size0 fillval) n (_ : n < List.length (List.replicate t.size0 fillval)) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceFillCommuteOneD.extract_fill_commute
[181, 1]
[195, 3]
simp at h
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 n : ℕ h : n < List.length (List.replicate (min extractlen t.size0) fillval) ⊢ List.getF (List.replicate (min extractlen t.size0) fillval) n h = List.getF (List.replicate t.size0 fillval) n (_ : n < List.length (List.replicate t.size0 fillval)) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 n : ℕ h✝ : n < List.length (List.replicate (min extractlen t.size0) fillval) h : n < extractlen ∧ n < t.size0 ⊢ List.getF (List.replicate (min extractlen t.size0) fillval) n h✝ = List.getF (List.replicate t.size0 fillval) n (_ : n < List.length (List.replicate t.size0 fillval)) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceFillCommuteOneD.extract_fill_commute
[181, 1]
[195, 3]
sorry
case a t : Tensor1D extractlen : ℕ fillval : FinInt 32 n : ℕ h✝ : n < List.length (List.replicate (min extractlen t.size0) fillval) h : n < extractlen ∧ n < t.size0 ⊢ List.getF (List.replicate (min extractlen t.size0) fillval) n h✝ = List.getF (List.replicate t.size0 fillval) n (_ : n < List.length (List.replicate t.size0 fillval)) case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceFillCommuteOneD.extract_fill_commute
[181, 1]
[195, 3]
sorry
case h_len t : Tensor1D extractlen : ℕ fillval : FinInt 32 ⊢ List.length (List.replicate (min extractlen t.size0) fillval) = List.length (List.take extractlen (List.replicate t.size0 fillval))
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceGenericCommute1D.equiv
[248, 1]
[264, 6]
intros valid_r
r✝ : Region linalg t : Tensor1D r : Region linalg rSpec : ℤ → FinInt 32 → FinInt 32 ⊢ validGenericRegion r rSpec → run ⟦ LHS r ⟧ (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })]) = run ⟦ RHS r ⟧ (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })])
r✝ : Region linalg t : Tensor1D r : Region linalg rSpec : ℤ → FinInt 32 → FinInt 32 valid_r : validGenericRegion r rSpec ⊢ run ⟦ LHS r ⟧ (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })]) = run ⟦ RHS r ⟧ (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })])
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceGenericCommute1D.equiv
[248, 1]
[264, 6]
simp[LHS, RHS]
r✝ : Region linalg t : Tensor1D r : Region linalg rSpec : ℤ → FinInt 32 → FinInt 32 valid_r : validGenericRegion r rSpec ⊢ run ⟦ LHS r ⟧ (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })]) = run ⟦ RHS r ⟧ (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })])
r✝ : Region linalg t : Tensor1D r : Region linalg rSpec : ℤ → FinInt 32 → FinInt 32 valid_r : validGenericRegion r rSpec ⊢ run (denoteRegion linalg (Region.mk "entry" [] [Op.mk "linalg.generic1d" [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [(SSAVal.SSAVal "t", MLIRType.tensor1d)] [r] (AttrDict.mk [AttrEntry.mk "len" (AttrValue.int 10 MLIRType.index)]), Op.mk "linalg.fill1d" [(SSAVal.SSAVal "out", MLIRType.tensor1d)] [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [] (AttrDict.mk [AttrEntry.mk "cst" (AttrValue.int 42 MLIRType.index)])]) []) (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })]) = run (denoteRegion linalg (Region.mk "entry" [] [Op.mk "linalg.generic1d" [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [(SSAVal.SSAVal "t", MLIRType.tensor1d)] [r] (AttrDict.mk [AttrEntry.mk "cst" (AttrValue.int 42 MLIRType.index)]), Op.mk "linalg.extractslice1d" [(SSAVal.SSAVal "out", MLIRType.tensor1d)] [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [] (AttrDict.mk [AttrEntry.mk "len" (AttrValue.int 10 MLIRType.index)])]) []) (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })])
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
ExtractSliceGenericCommute1D.equiv
[248, 1]
[264, 6]
sorry
r✝ : Region linalg t : Tensor1D r : Region linalg rSpec : ℤ → FinInt 32 → FinInt 32 valid_r : validGenericRegion r rSpec ⊢ run (denoteRegion linalg (Region.mk "entry" [] [Op.mk "linalg.generic1d" [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [(SSAVal.SSAVal "t", MLIRType.tensor1d)] [r] (AttrDict.mk [AttrEntry.mk "len" (AttrValue.int 10 MLIRType.index)]), Op.mk "linalg.fill1d" [(SSAVal.SSAVal "out", MLIRType.tensor1d)] [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [] (AttrDict.mk [AttrEntry.mk "cst" (AttrValue.int 42 MLIRType.index)])]) []) (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })]) = run (denoteRegion linalg (Region.mk "entry" [] [Op.mk "linalg.generic1d" [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [(SSAVal.SSAVal "t", MLIRType.tensor1d)] [r] (AttrDict.mk [AttrEntry.mk "cst" (AttrValue.int 42 MLIRType.index)]), Op.mk "linalg.extractslice1d" [(SSAVal.SSAVal "out", MLIRType.tensor1d)] [(SSAVal.SSAVal "x", MLIRType.tensor1d)] [] (AttrDict.mk [AttrEntry.mk "len" (AttrValue.int 10 MLIRType.index)])]) []) (SSAEnv.One [(SSAVal.SSAVal "t", { fst := MLIRType.tensor1d, snd := t })])
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_cons
[270, 1]
[274, 2]
simp[List.mapM, List.mapM.loop]
m : Type u_1 → Type u_2 a : Type u_3 b : Type u_1 M : Monad m LM : LawfulMonad m x : a xs : List a f : a → m b ⊢ mapM f (x :: xs) = do let b_1 ← f x let bs ← mapM f xs pure (b_1 :: bs)
m : Type u_1 → Type u_2 a : Type u_3 b : Type u_1 M : Monad m LM : LawfulMonad m x : a xs : List a f : a → m b ⊢ (do let __do_lift ← f x List.mapM.loop f xs [__do_lift]) = do let b_1 ← f x let bs ← List.mapM.loop f xs [] pure (b_1 :: bs)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_cons
[270, 1]
[274, 2]
sorry
m : Type u_1 → Type u_2 a : Type u_3 b : Type u_1 M : Monad m LM : LawfulMonad m x : a xs : List a f : a → m b ⊢ (do let __do_lift ← f x List.mapM.loop f xs [__do_lift]) = do let b_1 ← f x let bs ← List.mapM.loop f xs [] pure (b_1 :: bs)
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.commute_implies_mapM_commute
[275, 1]
[280, 107]
sorry
m : Type → Type u_1 a b : Type xs : List a y : a inst✝¹ : Monad m inst✝ : LawfulMonad m f g : a → m a k : List a → a → m b COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 ⊢ (do let r1 ← mapM f xs let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← mapM f xs k r1 r2
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
funext x
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 ⊢ fish (mapM f) (mapM g) = mapM (fish f g)
case h m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 x : List a ⊢ fish (mapM f) (mapM g) x = mapM (fish f g) x
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
induction x
case h m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 x : List a ⊢ fish (mapM f) (mapM g) x = mapM (fish f g) x
case h.nil m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 ⊢ fish (mapM f) (mapM g) [] = mapM (fish f g) [] case h.cons m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head✝ : a tail✝ : List a tail_ih✝ : fish (mapM f) (mapM g) tail✝ = mapM (fish f g) tail✝ ⊢ fish (mapM f) (mapM g) (head✝ :: tail✝) = mapM (fish f g) (head✝ :: tail✝)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
case nil => { simp[fish, List.mapM, List.mapM.loop]; }
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 ⊢ fish (mapM f) (mapM g) [] = mapM (fish f g) []
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
case cons head tail IH => { rewrite [mapM_cons]; simp[fish]; simp [bind_assoc] simp[mapM_cons]; congr; funext x'; rewrite [commute_implies_mapM_commute]; congr; funext x'; simp [fish] at IH; rewrite [<- IH]; simp[bind_assoc]; apply COMMUTE; }
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ fish (mapM f) (mapM g) (head :: tail) = mapM (fish f g) (head :: tail)
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
simp[fish, List.mapM, List.mapM.loop]
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 ⊢ fish (mapM f) (mapM g) [] = mapM (fish f g) []
no goals
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
rewrite [mapM_cons]
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ fish (mapM f) (mapM g) (head :: tail) = mapM (fish f g) (head :: tail)
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ fish (mapM f) (mapM g) (head :: tail) = do let b ← fish f g head let bs ← mapM (fish f g) tail pure (b :: bs)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
simp[fish]
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ fish (mapM f) (mapM g) (head :: tail) = do let b ← fish f g head let bs ← mapM (fish f g) tail pure (b :: bs)
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ (do let x ← f head let x_1 ← mapM f tail let __do_lift ← g x let __do_lift_1 ← mapM g x_1 pure (__do_lift :: __do_lift_1)) = do let x ← f head let b ← g x let bs ← mapM (fun a_1 => f a_1 >>= g) tail pure (b :: bs)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
congr
m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ (do let x ← f head let x_1 ← mapM f tail let __do_lift ← g x let __do_lift_1 ← mapM g x_1 pure (__do_lift :: __do_lift_1)) = do let x ← f head let b ← g x let bs ← mapM (fun a_1 => f a_1 >>= g) tail pure (b :: bs)
case e_a m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ (fun x => do let x_1 ← mapM f tail let __do_lift ← g x let __do_lift_1 ← mapM g x_1 pure (__do_lift :: __do_lift_1)) = fun x => do let b ← g x let bs ← mapM (fun a_1 => f a_1 >>= g) tail pure (b :: bs)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
funext x'
case e_a m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail ⊢ (fun x => do let x_1 ← mapM f tail let __do_lift ← g x let __do_lift_1 ← mapM g x_1 pure (__do_lift :: __do_lift_1)) = fun x => do let b ← g x let bs ← mapM (fun a_1 => f a_1 >>= g) tail pure (b :: bs)
case e_a.h m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail x' : a ⊢ (do let x ← mapM f tail let __do_lift ← g x' let __do_lift_1 ← mapM g x pure (__do_lift :: __do_lift_1)) = do let b ← g x' let bs ← mapM (fun a_1 => f a_1 >>= g) tail pure (b :: bs)
https://github.com/opencompl/lean-mlir.git
e43d21592801e5e40477b14b7a554e356060c40c
MLIR/Dialects/LinalgSemantics.lean
mapMCommute.mapM_commute
[282, 1]
[312, 2]
rewrite [commute_implies_mapM_commute]
case e_a.h m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail x' : a ⊢ (do let x ← mapM f tail let __do_lift ← g x' let __do_lift_1 ← mapM g x pure (__do_lift :: __do_lift_1)) = do let b ← g x' let bs ← mapM (fun a_1 => f a_1 >>= g) tail pure (b :: bs)
case e_a.h m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail x' : a ⊢ (do let r2 ← g x' let r1 ← mapM f tail let __do_lift ← mapM g r1 pure (r2 :: __do_lift)) = do let b ← g x' let bs ← mapM (fun a_1 => f a_1 >>= g) tail pure (b :: bs) case e_a.h.COMMUTE m : Type → Type u_1 a : Type M : Monad m LM : LawfulMonad m f g : a → m a COMMUTE : ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2 head : a tail : List a IH : fish (mapM f) (mapM g) tail = mapM (fish f g) tail x' : a ⊢ ∀ {b : Type} (x y : a) (k : a → a → m b), (do let r1 ← f x let r2 ← g y k r1 r2) = do let r2 ← g y let r1 ← f x k r1 r2