Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
⊢ match step M c with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
⊢ Respects (step M) (step (map M f₁ f₂ g₁.f g₂)) fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b
intro c _ ⟨cs, rfl⟩
case none
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
e : step M c = none
⊢ match none with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none

case some
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
val✝ : Cfg Γ Λ
e : step M c = some val✝
⊢ match some val✝ with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
⊢ match step M c with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none
cases e : step M c
case none
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
e : step M c = none
⊢ match none with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => Option.map (Cfg.map f₁ g₁.f) none = none
case none
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
e : step M c = none
⊢ match none with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none
rw [← M.map_step f₁ f₂ g₁ g₂ f₂₁ g₂₁ _ cs, e]
no goals
case none
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
e : step M c = none
⊢ match none with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => Option.map (Cfg.map f₁ g₁.f) none = none
rfl
case some
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
val✝ : Cfg Γ Λ
e : step M c = some val✝
⊢ Cfg.map f₁ g₁.f val✝ ∈ step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c)
case some
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
val✝ : Cfg Γ Λ
e : step M c = some val✝
⊢ match some val✝ with
  | some b₁ =>
    ∃ b₂,
      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂
  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none
refine' ⟨_, ⟨step_supports M ss e cs, rfl⟩, TransGen.single _⟩
case some
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
val✝ : Cfg Γ Λ
e : step M c = some val✝
⊢ Cfg.map f₁ g₁.f val✝ ∈ Option.map (Cfg.map f₁ g₁.f) (some val✝)
case some
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
val✝ : Cfg Γ Λ
e : step M c = some val✝
⊢ Cfg.map f₁ g₁.f val✝ ∈ step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c)
rw [← M.map_step f₁ f₂ g₁ g₂ f₂₁ g₂₁ _ cs, e]
no goals
case some
Γ : Type u_3
inst✝³ : Inhabited Γ
Γ' : Type u_4
inst✝² : Inhabited Γ'
Λ : Type u_1
inst✝¹ : Inhabited Λ
Λ' : Type u_2
inst✝ : Inhabited Λ'
M : Machine Γ Λ
f₁ : PointedMap Γ Γ'
f₂ : PointedMap Γ' Γ
g₁✝ : Λ → Λ'
g₂✝ : Λ' → Λ
g₁ : PointedMap Λ Λ'
g₂ : Λ' → Λ
S : Set Λ
ss : Supports M S
f₂₁ : Function.RightInverse f₁.f f₂.f
g₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q
c : Cfg Γ Λ
a₂✝ : Cfg Γ' Λ'
cs : c.q ∈ S
val✝ : Cfg Γ Λ
e : step M c = some val✝
⊢ Cfg.map f₁ g₁.f val✝ ∈ Option.map (Cfg.map f₁ g₁.f) (some val✝)
rfl