Theorem: FirstOrder.Language.structure_simpleGraphOfStructure
File: Mathlib/ModelTheory/Graph.lean

tactic: ext
state_before: L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
⊢ (simpleGraphOfStructure V).structure = S
state_after: case funMap.h.h.h
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
x✝² : ℕ
x✝¹ : Language.graph.Functions x✝²
x✝ : Fin x✝² → V
⊢ funMap x✝¹ x✝ = funMap x✝¹ x✝

case RelMap.h.h.h.a
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
x✝² : ℕ
x✝¹ : Language.graph.Relations x✝²
x✝ : Fin x✝² → V
⊢ RelMap x✝¹ x✝ ↔ RelMap x✝¹ x✝

tactic: case funMap n f xs =>
  exact (IsRelational.empty_functions n).elim f
state_before: case funMap.h.h.h
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
x✝² : ℕ
x✝¹ : Language.graph.Functions x✝²
x✝ : Fin x✝² → V
⊢ funMap x✝¹ x✝ = funMap x✝¹ x✝

case RelMap.h.h.h.a
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
x✝² : ℕ
x✝¹ : Language.graph.Relations x✝²
x✝ : Fin x✝² → V
⊢ RelMap x✝¹ x✝ ↔ RelMap x✝¹ x✝
state_after: case RelMap.h.h.h.a
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
x✝² : ℕ
x✝¹ : Language.graph.Relations x✝²
x✝ : Fin x✝² → V
⊢ RelMap x✝¹ x✝ ↔ RelMap x✝¹ x✝

tactic: exact (IsRelational.empty_functions n).elim f
state_before: L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
f : Language.graph.Functions n
xs : Fin n → V
⊢ funMap f xs = funMap f xs
state_after: no goals

tactic: rw [iff_eq_eq]
state_before: L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations n
xs : Fin n → V
⊢ RelMap r xs ↔ RelMap r xs
state_after: L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations n
xs : Fin n → V
⊢ RelMap r xs = RelMap r xs

tactic: cases' n with n
state_before: L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations n
xs : Fin n → V
⊢ RelMap r xs = RelMap r xs
state_after: case zero
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
r : Language.graph.Relations 0
xs : Fin 0 → V
⊢ RelMap r xs = RelMap r xs

case succ
L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations (n + 1)
xs : Fin (n + 1) → V
⊢ RelMap r xs = RelMap r xs

tactic: exact r.elim
state_before: case zero
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
r : Language.graph.Relations 0
xs : Fin 0 → V
⊢ RelMap r xs = RelMap r xs
state_after: no goals

tactic: cases' n with n
state_before: case succ
L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations (n + 1)
xs : Fin (n + 1) → V
⊢ RelMap r xs = RelMap r xs
state_after: case succ.zero
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
r : Language.graph.Relations (0 + 1)
xs : Fin (0 + 1) → V
⊢ RelMap r xs = RelMap r xs

case succ.succ
L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations (n + 1 + 1)
xs : Fin (n + 1 + 1) → V
⊢ RelMap r xs = RelMap r xs

tactic: exact r.elim
state_before: case succ.zero
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
r : Language.graph.Relations (0 + 1)
xs : Fin (0 + 1) → V
⊢ RelMap r xs = RelMap r xs
state_after: no goals

tactic: cases' n with n
state_before: case succ.succ
L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations (n + 1 + 1)
xs : Fin (n + 1 + 1) → V
⊢ RelMap r xs = RelMap r xs
state_after: case succ.succ.zero
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
r : Language.graph.Relations (0 + 1 + 1)
xs : Fin (0 + 1 + 1) → V
⊢ RelMap r xs = RelMap r xs

case succ.succ.succ
L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations (n + 1 + 1 + 1)
xs : Fin (n + 1 + 1 + 1) → V
⊢ RelMap r xs = RelMap r xs

tactic: cases r
state_before: case succ.succ.zero
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
r : Language.graph.Relations (0 + 1 + 1)
xs : Fin (0 + 1 + 1) → V
⊢ RelMap r xs = RelMap r xs
state_after: case succ.succ.zero.unit
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
xs : Fin (0 + 1 + 1) → V
⊢ RelMap PUnit.unit xs = RelMap PUnit.unit xs

tactic: change RelMap adj ![xs 0, xs 1] = _
state_before: case succ.succ.zero.unit
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
xs : Fin (0 + 1 + 1) → V
⊢ RelMap PUnit.unit xs = RelMap PUnit.unit xs
state_after: case succ.succ.zero.unit
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
xs : Fin (0 + 1 + 1) → V
⊢ RelMap adj ![xs 0, xs 1] = RelMap PUnit.unit xs

tactic: refine congr rfl (funext ?_)
state_before: case succ.succ.zero.unit
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
xs : Fin (0 + 1 + 1) → V
⊢ RelMap adj ![xs 0, xs 1] = RelMap PUnit.unit xs
state_after: case succ.succ.zero.unit
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
xs : Fin (0 + 1 + 1) → V
⊢ ∀ (x : Fin (Nat.succ 1)), ![xs 0, xs 1] x = xs x

tactic: simp [Fin.forall_fin_two]
state_before: case succ.succ.zero.unit
L : Language
α : Type w
V : Type w'
n : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
xs : Fin (0 + 1 + 1) → V
⊢ ∀ (x : Fin (Nat.succ 1)), ![xs 0, xs 1] x = xs x
state_after: no goals

tactic: exact r.elim
state_before: case succ.succ.succ
L : Language
α : Type w
V : Type w'
n✝ : ℕ
S : Language.graph.Structure V
inst✝ : V ⊨ Theory.simpleGraph
n : ℕ
r : Language.graph.Relations (n + 1 + 1 + 1)
xs : Fin (n + 1 + 1 + 1) → V
⊢ RelMap r xs = RelMap r xs
state_after: no goals