Theorem: denoteOp_equiv
Proof state before:
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
S : Semantics Δ
op_name : String
args : List (TypedSSAVal Δ)
regions : List (Region Δ)
attrs : AttrDict Δ
env : SSAEnv Δ
r : TypedArgs Δ
env' env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
x✝¹ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
argsRes : List (TypedArg Δ) × SSAEnv Δ
argRes : List (TypedArg Δ)
HargsRes : denoteOpArgs Δ args env = Except.ok (argRes, env)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
regR✝ : List (TypedArg Δ) × SSAEnv Δ
regR : List (TypedArg Δ)
regEnv : SSAEnv Δ
HRegInd :
  denoteRegionsEquivInvariant (TopM.mapDenoteRegion Δ regions) →
    ∀ ⦃opM : OpM Δ (TypedArgs Δ)⦄ ⦃env : SSAEnv Δ⦄ ⦃res : TypedArgs Δ⦄ ⦃env' : SSAEnv Δ⦄,
      OpM.toTopM (TopM.mapDenoteRegion Δ regions) opM env = Except.ok (res, env') →
        ∀ ⦃env₂ : SSAEnv Δ⦄,
          SSAEnv.equiv env env₂ →
            ∃ env₂',
              SSAEnv.equiv env' env₂' ∧ OpM.toTopM (TopM.mapDenoteRegion Δ regions) opM env₂ = Except.ok (res, env₂')
regEnv₂ : SSAEnv Δ
HregEnv₂ : SSAEnv.equiv regEnv regEnv₂
HregR :
  OpM.toTopM (TopM.mapDenoteRegion Δ regions)
      (Semantics.semantics_op (IOp.mk op_name [] argRes (OpM.denoteRegions regions 0) attrs)) env =
    Except.ok (regR, regEnv)
HregR₂ :
  OpM.toTopM (TopM.mapDenoteRegion Δ regions)
      (Semantics.semantics_op (IOp.mk op_name [] argRes (OpM.denoteRegions regions 0) attrs)) env₂ =
    Except.ok (regR, regEnv₂)
H : regR = r ∧ regEnv = env'
⊢ ∃ env₂',
    SSAEnv.equiv env' env₂' ∧
      (match
          OpM.toTopM (TopM.mapDenoteRegion Δ regions)
            (Semantics.semantics_op (IOp.mk op_name [] argRes (OpM.denoteRegions regions 0) attrs)) env₂ with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok v) =
        Except.ok (r, env₂')
Tactic:
cases H
Proof state after:
case intro
α₁ σ₁ : Type
ε₁ : σ₁ → Type
δ₁ : Dialect α₁ σ₁ ε₁
α₂ σ₂ : Type
ε₂ : σ₂ → Type
δ₂ : Dialect α₂ σ₂ ε₂
α σ : Type
ε : σ → Type
Δ : Dialect α σ ε
S : Semantics Δ
op_name : String
args : List (TypedSSAVal Δ)
regions : List (Region Δ)
attrs : AttrDict Δ
env : SSAEnv Δ
r : TypedArgs Δ
env' env₂ : SSAEnv Δ
Henv₂ : SSAEnv.equiv env env₂
x✝¹ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
argsRes : List (TypedArg Δ) × SSAEnv Δ
argRes : List (TypedArg Δ)
HargsRes : denoteOpArgs Δ args env = Except.ok (argRes, env)
x✝ : Except (String × SSAEnv Δ) (List (TypedArg Δ) × SSAEnv Δ)
regR✝ : List (TypedArg Δ) × SSAEnv Δ
regR : List (TypedArg Δ)
regEnv : SSAEnv Δ
HRegInd :
  denoteRegionsEquivInvariant (TopM.mapDenoteRegion Δ regions) →
    ∀ ⦃opM : OpM Δ (TypedArgs Δ)⦄ ⦃env : SSAEnv Δ⦄ ⦃res : TypedArgs Δ⦄ ⦃env' : SSAEnv Δ⦄,
      OpM.toTopM (TopM.mapDenoteRegion Δ regions) opM env = Except.ok (res, env') →
        ∀ ⦃env₂ : SSAEnv Δ⦄,
          SSAEnv.equiv env env₂ →
            ∃ env₂',
              SSAEnv.equiv env' env₂' ∧ OpM.toTopM (TopM.mapDenoteRegion Δ regions) opM env₂ = Except.ok (res, env₂')
regEnv₂ : SSAEnv Δ
HregEnv₂ : SSAEnv.equiv regEnv regEnv₂
HregR :
  OpM.toTopM (TopM.mapDenoteRegion Δ regions)
      (Semantics.semantics_op (IOp.mk op_name [] argRes (OpM.denoteRegions regions 0) attrs)) env =
    Except.ok (regR, regEnv)
HregR₂ :
  OpM.toTopM (TopM.mapDenoteRegion Δ regions)
      (Semantics.semantics_op (IOp.mk op_name [] argRes (OpM.denoteRegions regions 0) attrs)) env₂ =
    Except.ok (regR, regEnv₂)
left✝ : regR = r
right✝ : regEnv = env'
⊢ ∃ env₂',
    SSAEnv.equiv env' env₂' ∧
      (match
          OpM.toTopM (TopM.mapDenoteRegion Δ regions)
            (Semantics.semantics_op (IOp.mk op_name [] argRes (OpM.denoteRegions regions 0) attrs)) env₂ with
        | Except.error err => Except.error err
        | Except.ok v => Except.ok v) =
        Except.ok (r, env₂')