internlm/Lean-Github huggingface dataset:
Theorem: denoteOpArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env : SSAEnv Δ
r : List (TypedArg Δ)
env' env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR : List (TypedArg Δ) × SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok tailR
H : Except.ok ({ fst := headτ, snd := (headR, headEnv).fst } :: tailR.fst, tailR.snd) = Except.ok (r, env')
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok (r, env₂)
Tactic:
simp at H
Proof state after:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env : SSAEnv Δ
r : List (TypedArg Δ)
env' env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR : List (TypedArg Δ) × SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok tailR
H : { fst := headτ, snd := headR } :: tailR.fst = r ∧ tailR.snd = env'
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok (r, env₂)
Theorem: denoteOpArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env : SSAEnv Δ
r : List (TypedArg Δ)
env' env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR : List (TypedArg Δ) × SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok tailR
H : { fst := headτ, snd := headR } :: tailR.fst = r ∧ tailR.snd = env'
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok (r, env₂)
Tactic:
cases H
Proof state after:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env : SSAEnv Δ
r : List (TypedArg Δ)
env' env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR : List (TypedArg Δ) × SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok tailR
left✝ : { fst := headτ, snd := headR } :: tailR.fst = r
right✝ : tailR.snd = env'
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok (r, env₂)
Theorem: denoteOpArgs_equiv
Proof state before:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env : SSAEnv Δ
r : List (TypedArg Δ)
env' env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR : List (TypedArg Δ) × SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok tailR
left✝ : { fst := headτ, snd := headR } :: tailR.fst = r
right✝ : tailR.snd = env'
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok (r, env₂)
Tactic:
subst env' r
Proof state after:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR : List (TypedArg Δ) × SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok tailR
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok ({ fst := headτ, snd := headR } :: tailR.fst, env₂)
Theorem: denoteOpArgs_equiv
Proof state before:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR : List (TypedArg Δ) × SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok tailR
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok ({ fst := headτ, snd := headR } :: tailR.fst, env₂)
Tactic:
have ⟨tailR, tailEnv⟩ := tailR
Proof state after:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR✝ : List (TypedArg Δ) × SSAEnv Δ
tailR : List (TypedArg Δ)
tailEnv : SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok (tailR, tailEnv)
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok ({ fst := headτ, snd := headR } :: (tailR, tailEnv).fst, env₂)
Theorem: denoteOpArgs_equiv
Proof state before:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR✝ : List (TypedArg Δ) × SSAEnv Δ
tailR : List (TypedArg Δ)
tailEnv : SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail (headR, headEnv).snd =
    Except.ok (tailR, tailEnv)
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok ({ fst := headτ, snd := headR } :: (tailR, tailEnv).fst, env₂)
Tactic:
simp at HTailR
Proof state after:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
HInd :
  ∀ ⦃env : SSAEnv Δ⦄ ⦃r : List (TypedArg Δ)⦄ ⦃env' : SSAEnv Δ⦄,
    denoteOpArgs Δ tail env = Except.ok (r, env') →
      ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv env env₂ → denoteOpArgs Δ tail env₂ = Except.ok (r, env₂)
env env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
Hhead : TopM.get headτ headName env = Except.ok (headR, headEnv)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR✝ : List (TypedArg Δ) × SSAEnv Δ
tailR : List (TypedArg Δ)
tailEnv : SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail headEnv =
    Except.ok (tailR, tailEnv)
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok ({ fst := headτ, snd := headR } :: (tailR, tailEnv).fst, env₂)
Theorem: denoteOpArgs_equiv
Proof state before:
case intro.intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α✝ σ✝ : Type
ε✝ : σ✝ → Type
Δ : Dialect α✝ σ✝ ε✝
S : Semantics Δ
head : TypedSSAVal Δ
tail : List (TypedSSAVal Δ)
env₂ : SSAEnv Δ
headName : SSAVal
headτ : MLIRType Δ
headR✝ : MLIRType.eval headτ × SSAEnv Δ
headR : MLIRType.eval headτ
headEnv : SSAEnv Δ
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
tailR✝ : List (TypedArg Δ) × SSAEnv Δ
tailR : List (TypedArg Δ)
tailEnv : SSAEnv Δ
HTailR :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail headEnv =
    Except.ok (tailR, tailEnv)
AOEU : ∀ ⦃env₂ : SSAEnv Δ⦄, SSAEnv.equiv headEnv env₂ → denoteOpArgs Δ tail env₂ = Except.ok (tailR, env₂)
Henv₂ : SSAEnv.equiv headEnv env₂
left✝ :
  (match SSAEnv.get headName headτ headEnv with
    | some v => v
    | none => default) =
    headR
HInd :
  mapM
      (fun x s =>
        match TopM.get x.snd x.fst s with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
      tail env₂ =
    Except.ok (tailR, env₂)
⊢ (match
      mapM
        (fun x s =>
          match TopM.get x.snd x.fst s with
          | Except.error err => Except.error err
          | Except.ok v => Except.ok ({ fst := x.snd, snd := v.fst }, v.snd))
        tail env₂ with
    | Except.error err => Except.error err
    | Except.ok v => Except.ok ({ fst := headτ, snd := headR } :: v.fst, v.snd)) =
    Except.ok ({ fst := headτ, snd := headR } :: tailR, env₂)
Tactic:
simp [HInd]
Proof state after:
no goals
Theorem: denoteTypedArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
args : TypedArgs Δ
⊢ ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs args vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ →
          ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs args vals env₂ = Except.ok (r, env₂')
Tactic:
induction args
Proof state after:
case nil
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
⊢ ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs [] vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ → ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs [] vals env₂ = Except.ok (r, env₂')

case cons
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
head✝ : TypedArg Δ
tail✝ : List (TypedArg Δ)
tail_ih✝ :
  ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs tail✝ vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ →
          ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs tail✝ vals env₂ = Except.ok (r, env₂')
⊢ ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs (head✝ :: tail✝) vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ →
          ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs (head✝ :: tail✝) vals env₂ = Except.ok (r, env₂')
Theorem: denoteTypedArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
⊢ ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs [] vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ → ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs [] vals env₂ = Except.ok (r, env₂')
Tactic:
case nil =>
  intros val env₁ r env₁' H env₂ Henv₂
  simp [denoteTypedArgs] at *
  exists env₂
  simp_monad at *; subst H; assumption
Proof state after:
no goals
Theorem: denoteTypedArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
argsHead : TypedArg Δ
argsTail : List (TypedArg Δ)
HInd :
  ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs argsTail vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ →
          ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs argsTail vals env₂ = Except.ok (r, env₂')
⊢ ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs (argsHead :: argsTail) vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ →
          ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs (argsHead :: argsTail) vals env₂ = Except.ok (r, env₂')
Tactic:
case cons argsHead argsTail HInd =>
  intros vals env₁ r env₁' H env₂ Henv₂
  have ⟨valsHead, valsTail, HVals, HHead, HTail⟩ := denoteTypedArgs_cons_args H
  subst vals
  have HHead₂ := TopM.set_equiv Henv₂ HHead
  specialize (HInd HTail (by apply SSAEnv.equiv_set Henv₂))
  have ⟨env₂', Hequiv₂', Henv₂'⟩ := HInd
  exists env₂'
  cases r
  rw [denoteTypedArgs_cons_unfold]
  simp_monad
  rw [HHead₂]; simp; rw [Henv₂']
  simp; assumption
Proof state after:
no goals
Theorem: denoteTypedArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
⊢ ∀ ⦃vals : List SSAVal⦄ ⦃env₁ : SSAEnv Δ⦄ ⦃r : Unit⦄ ⦃env₁' : SSAEnv Δ⦄,
    denoteTypedArgs [] vals env₁ = Except.ok (r, env₁') →
      ∀ ⦃env₂ : SSAEnv Δ⦄,
        SSAEnv.equiv env₁ env₂ → ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs [] vals env₂ = Except.ok (r, env₂')
Tactic:
intros val env₁ r env₁' H env₂ Henv₂
Proof state after:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
val : List SSAVal
env₁ : SSAEnv Δ
r : Unit
env₁' : SSAEnv Δ
H : denoteTypedArgs [] val env₁ = Except.ok (r, env₁')
env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env₁ env₂
⊢ ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs [] val env₂ = Except.ok (r, env₂')
Theorem: denoteTypedArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
val : List SSAVal
env₁ : SSAEnv Δ
r : Unit
env₁' : SSAEnv Δ
H : denoteTypedArgs [] val env₁ = Except.ok (r, env₁')
env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env₁ env₂
⊢ ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ denoteTypedArgs [] val env₂ = Except.ok (r, env₂')
Tactic:
simp [denoteTypedArgs] at *
Proof state after:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
val : List SSAVal
env₁ : SSAEnv Δ
r : Unit
env₁' : SSAEnv Δ
H : pure () env₁ = Except.ok (r, env₁')
env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env₁ env₂
⊢ ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ pure () env₂ = Except.ok (r, env₂')
Theorem: denoteTypedArgs_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
val : List SSAVal
env₁ : SSAEnv Δ
r : Unit
env₁' : SSAEnv Δ
H : pure () env₁ = Except.ok (r, env₁')
env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env₁ env₂
⊢ ∃ env₂', SSAEnv.equiv env₁' env₂' ∧ pure () env₂ = Except.ok (r, env₂')
Tactic:
exists env₂
Proof state after:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
val : List SSAVal
env₁ : SSAEnv Δ
r : Unit
env₁' : SSAEnv Δ
H : pure () env₁ = Except.ok (r, env₁')
env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env₁ env₂
⊢ SSAEnv.equiv env₁' env₂ ∧ pure () env₂ = Except.ok (r, env₂)