Theorem: FirstOrder.Language.BoundedFormula.realize_constantsVarsEquiv
File: Mathlib/ModelTheory/Semantics.lean

tactic: refine' realize_mapTermRel_id (fun n t xs => realize_constantsVarsEquivLeft) fun n R xs => _
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.161517
P : Type ?u.161520
inst✝⁴ : Structure L M
inst✝³ : Structure L N
inst✝² : Structure L P
α : Type u'
β : Type v'
n✝ l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝ : Fin l → M
inst✝¹ : Structure (L[[α]]) M
inst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M
n : ℕ
φ : BoundedFormula (L[[α]]) β n
v : β → M
xs : Fin n → M
⊢ Realize (↑constantsVarsEquiv φ) (Sum.elim (fun a => ↑(Language.con L a)) v) xs ↔ Realize φ v xs

tactic: rw [← (lhomWithConstants L α).map_onRelation
    (Equiv.sumEmpty (L.Relations n) ((constantsOn α).Relations n) R) xs]
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.161517
P : Type ?u.161520
inst✝⁴ : Structure L M
inst✝³ : Structure L N
inst✝² : Structure L P
α : Type u'
β : Type v'
n✝¹ l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝¹ : Fin l → M
inst✝¹ : Structure (L[[α]]) M
inst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M
n✝ : ℕ
φ : BoundedFormula (L[[α]]) β n✝
v : β → M
xs✝ : Fin n✝ → M
n : ℕ
R : Relations (L[[α]]) n
xs : Fin n → M
⊢ RelMap (↑((fun x => Equiv.sumEmpty (Relations L x) (Relations (constantsOn α) x)) n) R) xs = RelMap R xs

tactic: rcongr
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.161517
P : Type ?u.161520
inst✝⁴ : Structure L M
inst✝³ : Structure L N
inst✝² : Structure L P
α : Type u'
β : Type v'
n✝¹ l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝¹ : Fin l → M
inst✝¹ : Structure (L[[α]]) M
inst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M
n✝ : ℕ
φ : BoundedFormula (L[[α]]) β n✝
v : β → M
xs✝ : Fin n✝ → M
n : ℕ
R : Relations (L[[α]]) n
xs : Fin n → M
⊢ RelMap (LHom.onRelation (lhomWithConstants L α) (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) R))
      xs =
    RelMap R xs

tactic: cases' R with R R
state_before: case a
L : Language
L' : Language
M : Type w
N : Type ?u.161517
P : Type ?u.161520
inst✝⁴ : Structure L M
inst✝³ : Structure L N
inst✝² : Structure L P
α : Type u'
β : Type v'
n✝¹ l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝¹ : Fin l → M
inst✝¹ : Structure (L[[α]]) M
inst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M
n✝ : ℕ
φ : BoundedFormula (L[[α]]) β n✝
v : β → M
xs✝ : Fin n✝ → M
n : ℕ
R : Relations (L[[α]]) n
xs : Fin n → M
⊢ RelMap (LHom.onRelation (lhomWithConstants L α) (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) R))
      xs ↔
    RelMap R xs

tactic: simp
state_before: case a.inl
L : Language
L' : Language
M : Type w
N : Type ?u.161517
P : Type ?u.161520
inst✝⁴ : Structure L M
inst✝³ : Structure L N
inst✝² : Structure L P
α : Type u'
β : Type v'
n✝¹ l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝¹ : Fin l → M
inst✝¹ : Structure (L[[α]]) M
inst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M
n✝ : ℕ
φ : BoundedFormula (L[[α]]) β n✝
v : β → M
xs✝ : Fin n✝ → M
n : ℕ
xs : Fin n → M
R : Relations L n
⊢ RelMap
      (LHom.onRelation (lhomWithConstants L α)
        (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) (Sum.inl R)))
      xs ↔
    RelMap (Sum.inl R) xs

tactic: exact isEmptyElim R
state_before: case a.inr
L : Language
L' : Language
M : Type w
N : Type ?u.161517
P : Type ?u.161520
inst✝⁴ : Structure L M
inst✝³ : Structure L N
inst✝² : Structure L P
α : Type u'
β : Type v'
n✝¹ l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝¹ : Fin l → M
inst✝¹ : Structure (L[[α]]) M
inst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M
n✝ : ℕ
φ : BoundedFormula (L[[α]]) β n✝
v : β → M
xs✝ : Fin n✝ → M
n : ℕ
xs : Fin n → M
R : Relations (constantsOn α) n
⊢ RelMap
      (LHom.onRelation (lhomWithConstants L α)
        (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) (Sum.inr R)))
      xs ↔
    RelMap (Sum.inr R) xs