[GOAL]
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
G' : ℕ → Type w
inst✝ : (i : ℕ) → Structure L (G' i)
f' : (n : ℕ) → G' n ↪[L] G' (n + 1)
m n : ℕ
h : m ≤ n
⊢ ↑(natLERec f' m n h) = fun a => Nat.leRecOn h (fun k => ↑(f' k)) a
[PROOFSTEP]
obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le h
[GOAL]
case intro
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
G' : ℕ → Type w
inst✝ : (i : ℕ) → Structure L (G' i)
f' : (n : ℕ) → G' n ↪[L] G' (n + 1)
m k : ℕ
h : m ≤ m + k
⊢ ↑(natLERec f' m (m + k) h) = fun a => Nat.leRecOn h (fun k => ↑(f' k)) a
[PROOFSTEP]
ext x
[GOAL]
case intro.h
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
G' : ℕ → Type w
inst✝ : (i : ℕ) → Structure L (G' i)
f' : (n : ℕ) → G' n ↪[L] G' (n + 1)
m k : ℕ
h : m ≤ m + k
x : G' m
⊢ ↑(natLERec f' m (m + k) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x
[PROOFSTEP]
induction' k with k ih
[GOAL]
case intro.h.zero
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
G' : ℕ → Type w
inst✝ : (i : ℕ) → Structure L (G' i)
f' : (n : ℕ) → G' n ↪[L] G' (n + 1)
m k : ℕ
h✝ : m ≤ m + k
x : G' m
h : m ≤ m + Nat.zero
⊢ ↑(natLERec f' m (m + Nat.zero) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x
[PROOFSTEP]
rw [natLERec, Nat.leRecOn_self, Embedding.refl_apply, Nat.leRecOn_self]
[GOAL]
case intro.h.succ
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
G' : ℕ → Type w
inst✝ : (i : ℕ) → Structure L (G' i)
f' : (n : ℕ) → G' n ↪[L] G' (n + 1)
m k✝ : ℕ
h✝ : m ≤ m + k✝
x : G' m
k : ℕ
ih : ∀ (h : m ≤ m + k), ↑(natLERec f' m (m + k) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x
h : m ≤ m + Nat.succ k
⊢ ↑(natLERec f' m (m + Nat.succ k) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x
[PROOFSTEP]
rw [Nat.leRecOn_succ le_self_add, natLERec, Nat.leRecOn_succ le_self_add, ← natLERec, Embedding.comp_apply, ih]
[GOAL]
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
G' : ℕ → Type w
inst✝ : (i : ℕ) → Structure L (G' i)
f' : (n : ℕ) → G' n ↪[L] G' (n + 1)
i✝ j✝ k✝ : ℕ
hij : i✝ ≤ j✝
hjk : j✝ ≤ k✝
⊢ ∀ (x : G' i✝), ↑(natLERec f' j✝ k✝ hjk) (↑(natLERec f' i✝ j✝ hij) x) = ↑(natLERec f' i✝ k✝ (_ : i✝ ≤ k✝)) x
[PROOFSTEP]
simp [Nat.leRecOn_trans hij hjk]
[GOAL]
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
α : Type u_1
i : ι
x : α → G i
⊢ unify f (fun a => Structure.Sigma.mk f i (x a)) i
      (_ : ∀ (j : ι), j ∈ range (Sigma.fst ∘ fun a => Structure.Sigma.mk f i (x a)) → j ≤ i) =
    x
[PROOFSTEP]
ext a
[GOAL]
case h
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
α : Type u_1
i : ι
x : α → G i
a : α
⊢ unify f (fun a => Structure.Sigma.mk f i (x a)) i
      (_ : ∀ (j : ι), j ∈ range (Sigma.fst ∘ fun a => Structure.Sigma.mk f i (x a)) → j ≤ i) a =
    x a
[PROOFSTEP]
rw [unify]
[GOAL]
case h
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
α : Type u_1
i : ι
x : α → G i
a : α
⊢ ↑(f (Structure.Sigma.mk f i (x a)).fst i (_ : (Structure.Sigma.mk f i (x a)).fst ≤ i))
      (Structure.Sigma.mk f i (x a)).snd =
    x a
[PROOFSTEP]
apply DirectedSystem.map_self
[GOAL]
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
α : Type u_1
x : α → Σˣ f
i j : ι
ij : i ≤ j
h : i ∈ upperBounds (range (Sigma.fst ∘ x))
⊢ ↑(f i j ij) ∘ unify f x i h = unify f x j (_ : ∀ (k : ι), k ∈ range (Sigma.fst ∘ x) → k ≤ j)
[PROOFSTEP]
ext a
[GOAL]
case h
L : Language
ι : Type v
inst✝² : Preorder ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
α : Type u_1
x : α → Σˣ f
i j : ι
ij : i ≤ j
h : i ∈ upperBounds (range (Sigma.fst ∘ x))
a : α
⊢ (↑(f i j ij) ∘ unify f x i h) a = unify f x j (_ : ∀ (k : ι), k ∈ range (Sigma.fst ∘ x) → k ≤ j) a
[PROOFSTEP]
simp [unify, DirectedSystem.map_map]
[GOAL]
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
⊢ match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
[PROOFSTEP]
obtain ⟨ijk, hijijk, hjkijk⟩ := directed_of (· ≤ ·) ij jk
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
[PROOFSTEP]
refine' ⟨ijk, le_trans hiij hijijk, le_trans hkjk hjkijk, _⟩
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ ↑(f i ijk (_ : i ≤ ijk)) x = ↑(f k ijk (_ : k ≤ ijk)) z
[PROOFSTEP]
rw [← DirectedSystem.map_map, hij, DirectedSystem.map_map]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ ↑(f j ijk (_ : j ≤ ijk)) y = ↑(f k ijk (_ : k ≤ ijk)) z
case intro.intro.hjk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ ij ≤ ijk
case intro.intro.hjk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ ij ≤ ijk
case intro.intro.hjk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ ij ≤ ijk
[PROOFSTEP]
symm
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ ↑(f k ijk (_ : k ≤ ijk)) z = ↑(f j ijk (_ : j ≤ ijk)) y
[PROOFSTEP]
rw [← DirectedSystem.map_map, ← hjk, DirectedSystem.map_map]
[GOAL]
case intro.intro.hjk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ jk ≤ ijk
[PROOFSTEP]
assumption
[GOAL]
case intro.intro.hjk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x✝⁴ x✝³ x✝² : Σˣ f
i : ι
x : (fun i => G i) i
j : ι
y : (fun i => G i) j
x✝¹ :
  match { fst := i, snd := x } with
  | { fst := i, snd := x } =>
    match { fst := j, snd := y } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
k : ι
z : (fun i => G i) k
x✝ :
  match { fst := j, snd := y } with
  | { fst := i, snd := x } =>
    match { fst := k, snd := z } with
    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y
ij : ι
hiij : i ≤ ij
hjij : j ≤ ij
hij : ↑(f i ij hiij) x = ↑(f j ij hjij) y
jk : ι
hjjk : j ≤ jk
hkjk : k ≤ jk
hjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z
ijk : ι
hijijk : ij ≤ ijk
hjkijk : jk ≤ ijk
⊢ ij ≤ ijk
[PROOFSTEP]
assumption
[GOAL]
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
x y : Σˣ f
i : ι
hx : x.fst ≤ i
hy : y.fst ≤ i
⊢ x ≈ y ↔ ↑(f x.fst i hx) x.snd = ↑(f y.fst i hy) y.snd
[PROOFSTEP]
cases x
[GOAL]
case mk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
y : Σˣ f
i : ι
hy : y.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hx : { fst := fst✝, snd := snd✝ }.fst ≤ i
⊢ { fst := fst✝, snd := snd✝ } ≈ y ↔
    ↑(f { fst := fst✝, snd := snd✝ }.fst i hx) { fst := fst✝, snd := snd✝ }.snd = ↑(f y.fst i hy) y.snd
[PROOFSTEP]
cases y
[GOAL]
case mk.mk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
i fst✝¹ : ι
snd✝¹ : (fun i => G i) fst✝¹
hx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hy : { fst := fst✝, snd := snd✝ }.fst ≤ i
⊢ { fst := fst✝¹, snd := snd✝¹ } ≈ { fst := fst✝, snd := snd✝ } ↔
    ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =
      ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd
[PROOFSTEP]
refine' ⟨fun xy => _, fun xy => ⟨i, hx, hy, xy⟩⟩
[GOAL]
case mk.mk
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
i fst✝¹ : ι
snd✝¹ : (fun i => G i) fst✝¹
hx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hy : { fst := fst✝, snd := snd✝ }.fst ≤ i
xy : { fst := fst✝¹, snd := snd✝¹ } ≈ { fst := fst✝, snd := snd✝ }
⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =
    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd
[PROOFSTEP]
obtain ⟨j, _, _, h⟩ := xy
[GOAL]
case mk.mk.intro.intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
i fst✝¹ : ι
snd✝¹ : (fun i => G i) fst✝¹
hx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hy : { fst := fst✝, snd := snd✝ }.fst ≤ i
j : ι
w✝¹ : fst✝¹ ≤ j
w✝ : fst✝ ≤ j
h : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝
⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =
    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd
[PROOFSTEP]
obtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j
[GOAL]
case mk.mk.intro.intro.intro.intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
i fst✝¹ : ι
snd✝¹ : (fun i => G i) fst✝¹
hx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hy : { fst := fst✝, snd := snd✝ }.fst ≤ i
j : ι
w✝¹ : fst✝¹ ≤ j
w✝ : fst✝ ≤ j
h : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝
k : ι
ik : i ≤ k
jk : j ≤ k
⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =
    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd
[PROOFSTEP]
have h := congr_arg (f j k jk) h
[GOAL]
case mk.mk.intro.intro.intro.intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
i fst✝¹ : ι
snd✝¹ : (fun i => G i) fst✝¹
hx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hy : { fst := fst✝, snd := snd✝ }.fst ≤ i
j : ι
w✝¹ : fst✝¹ ≤ j
w✝ : fst✝ ≤ j
h✝ : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝
k : ι
ik : i ≤ k
jk : j ≤ k
h : ↑(f j k jk) (↑(f fst✝¹ j w✝¹) snd✝¹) = ↑(f j k jk) (↑(f fst✝ j w✝) snd✝)
⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =
    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd
[PROOFSTEP]
apply (f i k ik).injective
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.a
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
i fst✝¹ : ι
snd✝¹ : (fun i => G i) fst✝¹
hx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hy : { fst := fst✝, snd := snd✝ }.fst ≤ i
j : ι
w✝¹ : fst✝¹ ≤ j
w✝ : fst✝ ≤ j
h✝ : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝
k : ι
ik : i ≤ k
jk : j ≤ k
h : ↑(f j k jk) (↑(f fst✝¹ j w✝¹) snd✝¹) = ↑(f j k jk) (↑(f fst✝ j w✝) snd✝)
⊢ ↑(f i k ik) (↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd) =
    ↑(f i k ik) (↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd)
[PROOFSTEP]
rw [DirectedSystem.map_map, DirectedSystem.map_map] at *
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.a
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
i fst✝¹ : ι
snd✝¹ : (fun i => G i) fst✝¹
hx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i
fst✝ : ι
snd✝ : (fun i => G i) fst✝
hy : { fst := fst✝, snd := snd✝ }.fst ≤ i
j : ι
w✝¹ : fst✝¹ ≤ j
w✝ : fst✝ ≤ j
h✝ : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝
k : ι
ik : i ≤ k
jk : j ≤ k
h : ↑(f fst✝¹ k (_ : fst✝¹ ≤ k)) snd✝¹ = ↑(f fst✝ k (_ : fst✝ ≤ k)) snd✝
⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst k (_ : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ k))
      { fst := fst✝¹, snd := snd✝¹ }.snd =
    ↑(f { fst := fst✝, snd := snd✝ }.fst k (_ : { fst := fst✝, snd := snd✝ }.fst ≤ k)) { fst := fst✝, snd := snd✝ }.snd
[PROOFSTEP]
exact h
[GOAL]
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
n : ℕ
F : Functions L n
x : Fin n → Σˣ f
i j : ι
hi : i ∈ upperBounds (range (Sigma.fst ∘ x))
hj : j ∈ upperBounds (range (Sigma.fst ∘ x))
⊢ Structure.Sigma.mk f i (funMap F (unify f x i hi)) ≈ Structure.Sigma.mk f j (funMap F (unify f x j hj))
[PROOFSTEP]
obtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
n : ℕ
F : Functions L n
x : Fin n → Σˣ f
i j : ι
hi : i ∈ upperBounds (range (Sigma.fst ∘ x))
hj : j ∈ upperBounds (range (Sigma.fst ∘ x))
k : ι
ik : i ≤ k
jk : j ≤ k
⊢ Structure.Sigma.mk f i (funMap F (unify f x i hi)) ≈ Structure.Sigma.mk f j (funMap F (unify f x j hj))
[PROOFSTEP]
refine' ⟨k, ik, jk, _⟩
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
n : ℕ
F : Functions L n
x : Fin n → Σˣ f
i j : ι
hi : i ∈ upperBounds (range (Sigma.fst ∘ x))
hj : j ∈ upperBounds (range (Sigma.fst ∘ x))
k : ι
ik : i ≤ k
jk : j ≤ k
⊢ ↑(f i k ik) (funMap F (unify f x i hi)) = ↑(f j k jk) (funMap F (unify f x j hj))
[PROOFSTEP]
rw [(f i k ik).map_fun, (f j k jk).map_fun, comp_unify, comp_unify]
[GOAL]
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
n : ℕ
R : Relations L n
x : Fin n → Σˣ f
i j : ι
hi : i ∈ upperBounds (range (Sigma.fst ∘ x))
hj : j ∈ upperBounds (range (Sigma.fst ∘ x))
⊢ RelMap R (unify f x i hi) = RelMap R (unify f x j hj)
[PROOFSTEP]
obtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝³ : Preorder ι
G : ι → Type w
inst✝² : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
n : ℕ
R : Relations L n
x : Fin n → Σˣ f
i j : ι
hi : i ∈ upperBounds (range (Sigma.fst ∘ x))
hj : j ∈ upperBounds (range (Sigma.fst ∘ x))
k : ι
ik : i ≤ k
jk : j ≤ k
⊢ RelMap R (unify f x i hi) = RelMap R (unify f x j hj)
[PROOFSTEP]
rw [← (f i k ik).map_rel, comp_unify, ← (f j k jk).map_rel, comp_unify]
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x y : α → Σˣ f
xy : x ≈ y
⊢ ∃ i hx hy, unify f x i hx = unify f y i hy
[PROOFSTEP]
obtain ⟨i, hi⟩ := Fintype.bddAbove_range (Sum.elim (fun a => (x a).1) fun a => (y a).1)
[GOAL]
case intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x y : α → Σˣ f
xy : x ≈ y
i : ι
hi : i ∈ upperBounds (range (Sum.elim (fun a => (x a).fst) fun a => (y a).fst))
⊢ ∃ i hx hy, unify f x i hx = unify f y i hy
[PROOFSTEP]
rw [Sum.elim_range, upperBounds_union] at hi
[GOAL]
case intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x y : α → Σˣ f
xy : x ≈ y
i : ι
hi : i ∈ upperBounds (range fun a => (x a).fst) ∩ upperBounds (range fun a => (y a).fst)
⊢ ∃ i hx hy, unify f x i hx = unify f y i hy
[PROOFSTEP]
simp_rw [← Function.comp_apply (f := Sigma.fst)] at hi
[GOAL]
case intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x y : α → Σˣ f
xy : x ≈ y
i : ι
hi : i ∈ upperBounds (range fun a => (Sigma.fst ∘ x) a) ∩ upperBounds (range fun a => (Sigma.fst ∘ y) a)
⊢ ∃ i hx hy, unify f x i hx = unify f y i hy
[PROOFSTEP]
exact ⟨i, hi.1, hi.2, funext fun a => (equiv_iff G f _ _).1 (xy a)⟩
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
x y : Fin n → Σˣ f
xy : x ≈ y
⊢ funMap F x ≈ funMap F y
[PROOFSTEP]
obtain ⟨i, hx, hy, h⟩ := exists_unify_eq G f xy
[GOAL]
case intro.intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
x y : Fin n → Σˣ f
xy : x ≈ y
i : ι
hx : i ∈ upperBounds (range (Sigma.fst ∘ x))
hy : i ∈ upperBounds (range (Sigma.fst ∘ y))
h : unify f x i hx = unify f y i hy
⊢ funMap F x ≈ funMap F y
[PROOFSTEP]
refine' Setoid.trans (funMap_equiv_unify G f F x i hx) (Setoid.trans _ (Setoid.symm (funMap_equiv_unify G f F y i hy)))
[GOAL]
case intro.intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
x y : Fin n → Σˣ f
xy : x ≈ y
i : ι
hx : i ∈ upperBounds (range (Sigma.fst ∘ x))
hy : i ∈ upperBounds (range (Sigma.fst ∘ y))
h : unify f x i hx = unify f y i hy
⊢ Structure.Sigma.mk f i (funMap F (unify f x i hx)) ≈ Structure.Sigma.mk f i (funMap F (unify f y i hy))
[PROOFSTEP]
rw [h]
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
x y : Fin n → Σˣ f
xy : x ≈ y
⊢ RelMap R x = RelMap R y
[PROOFSTEP]
obtain ⟨i, hx, hy, h⟩ := exists_unify_eq G f xy
[GOAL]
case intro.intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
x y : Fin n → Σˣ f
xy : x ≈ y
i : ι
hx : i ∈ upperBounds (range (Sigma.fst ∘ x))
hy : i ∈ upperBounds (range (Sigma.fst ∘ y))
h : unify f x i hx = unify f y i hy
⊢ RelMap R x = RelMap R y
[PROOFSTEP]
refine' _root_.trans (relMap_equiv_unify G f R x i hx) (_root_.trans _ (symm (relMap_equiv_unify G f R y i hy)))
[GOAL]
case intro.intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
x y : Fin n → Σˣ f
xy : x ≈ y
i : ι
hx : i ∈ upperBounds (range (Sigma.fst ∘ x))
hy : i ∈ upperBounds (range (Sigma.fst ∘ y))
h : unify f x i hx = unify f y i hy
⊢ RelMap R (unify f x i hx) = RelMap R (unify f y i hy)
[PROOFSTEP]
rw [h]
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
i : ι
x : Fin n → G i
⊢ (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) =
    Quotient.mk (setoid G f) (Structure.Sigma.mk f i (funMap F x))
[PROOFSTEP]
simp [Function.comp_apply, funMap_quotient_mk', Quotient.eq']
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
i : ι
x : Fin n → G i
⊢ (funMap F fun i_1 => Structure.Sigma.mk f i (x i_1)) ≈ Structure.Sigma.mk f i (funMap F x)
[PROOFSTEP]
obtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i (Classical.choose (Fintype.bddAbove_range fun _ : Fin n => i))
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
i : ι
x : Fin n → G i
k : ι
ik : i ≤ k
jk : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k
⊢ (funMap F fun i_1 => Structure.Sigma.mk f i (x i_1)) ≈ Structure.Sigma.mk f i (funMap F x)
[PROOFSTEP]
refine' ⟨k, jk, ik, _⟩
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
i : ι
x : Fin n → G i
k : ι
ik : i ≤ k
jk : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k
⊢ ↑(f (Classical.choose (_ : BddAbove (range fun a => (Structure.Sigma.mk f i (x a)).fst))) k jk)
      (funMap F
        (unify f (fun i_1 => Structure.Sigma.mk f i (x i_1))
          (Classical.choose (_ : BddAbove (range fun a => (Structure.Sigma.mk f i (x a)).fst)))
          (_ :
            Classical.choose (_ : BddAbove (range fun a => (Structure.Sigma.mk f i (x a)).fst)) ∈
              upperBounds (range fun a => (Structure.Sigma.mk f i (x a)).fst)))) =
    ↑(f i k ik) (funMap F x)
[PROOFSTEP]
simp only [Embedding.map_fun, comp_unify]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
F : Functions L n
i : ι
x : Fin n → G i
k : ι
ik : i ≤ k
jk : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k
⊢ funMap F
      (unify f (fun i_1 => Structure.Sigma.mk f i (x i_1)) k
        (_ : ∀ (k_1 : ι), k_1 ∈ range (Sigma.fst ∘ fun i_1 => Structure.Sigma.mk f i (x i_1)) → k_1 ≤ k)) =
    funMap F (↑(f i k ik) ∘ x)
[PROOFSTEP]
rfl
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
i : ι
x : Fin n → G i
⊢ (RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) = RelMap R x
[PROOFSTEP]
rw [relMap_quotient_mk']
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
i : ι
x : Fin n → G i
⊢ (RelMap R fun a => Structure.Sigma.mk f i (x a)) = RelMap R x
[PROOFSTEP]
obtain ⟨k, _, _⟩ := directed_of (· ≤ ·) i (Classical.choose (Fintype.bddAbove_range fun _ : Fin n => i))
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
i : ι
x : Fin n → G i
k : ι
left✝ : i ≤ k
right✝ : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k
⊢ (RelMap R fun a => Structure.Sigma.mk f i (x a)) = RelMap R x
[PROOFSTEP]
rw [relMap_equiv_unify G f R (fun a => .mk f i (x a)) i]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
i : ι
x : Fin n → G i
k : ι
left✝ : i ≤ k
right✝ : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k
⊢ RelMap R (unify f (fun a => Structure.Sigma.mk f i (x a)) i ?intro.intro) = RelMap R x
case intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
n : ℕ
R : Relations L n
i : ι
x : Fin n → G i
k : ι
left✝ : i ≤ k
right✝ : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k
⊢ i ∈ upperBounds (range (Sigma.fst ∘ fun a => Structure.Sigma.mk f i (x a)))
[PROOFSTEP]
rw [unify_sigma_mk_self]
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
⊢ ∃ i y, x = fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))
[PROOFSTEP]
obtain ⟨i, hi⟩ := Fintype.bddAbove_range fun a => (x a).out.1
[GOAL]
case intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
⊢ ∃ i y, x = fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))
[PROOFSTEP]
refine' ⟨i, unify f (Quotient.out ∘ x) i hi, _⟩
[GOAL]
case intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
⊢ x = fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (unify f (Quotient.out ∘ x) i hi a))
[PROOFSTEP]
ext a
[GOAL]
case intro.h
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
a : α
⊢ x a = Quotient.mk (setoid G f) (Structure.Sigma.mk f i (unify f (Quotient.out ∘ x) i hi a))
[PROOFSTEP]
rw [Quotient.eq_mk_iff_out, unify]
[GOAL]
case intro.h
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
a : α
⊢ Quotient.out (x a) ≈
    Structure.Sigma.mk f i
      (↑(f ((Quotient.out ∘ x) a).fst i (_ : ((Quotient.out ∘ x) a).fst ≤ i)) ((Quotient.out ∘ x) a).snd)
[PROOFSTEP]
generalize_proofs r
[GOAL]
case intro.h
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
a : α
r : ((Quotient.out ∘ x) a).fst ≤ i
⊢ Quotient.out (x a) ≈ Structure.Sigma.mk f i (↑(f ((Quotient.out ∘ x) a).fst i r) ((Quotient.out ∘ x) a).snd)
[PROOFSTEP]
change _ ≈ .mk f i (f (Quotient.out (x a)).fst i r (Quotient.out (x a)).snd)
[GOAL]
case intro.h
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
a : α
r : ((Quotient.out ∘ x) a).fst ≤ i
⊢ Quotient.out (x a) ≈ Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)
[PROOFSTEP]
have : (.mk f i (f (Quotient.out (x a)).fst i r (Quotient.out (x a)).snd) : Σˣ f).fst ≤ i := le_rfl
[GOAL]
case intro.h
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
a : α
r : ((Quotient.out ∘ x) a).fst ≤ i
this : (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst ≤ i
⊢ Quotient.out (x a) ≈ Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)
[PROOFSTEP]
rw [equiv_iff G f (i := i) (hi _) this]
[GOAL]
case intro.h
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
a : α
r : ((Quotient.out ∘ x) a).fst ≤ i
this : (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst ≤ i
⊢ ↑(f (Quotient.out (x a)).fst i (_ : (Quotient.out (x a)).fst ≤ i)) (Quotient.out (x a)).snd =
    ↑(f (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst i this)
      (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).snd
[PROOFSTEP]
simp only [DirectedSystem.map_self]
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
α : Type u_1
inst✝ : Fintype α
x : α → DirectLimit G f
i : ι
hi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)
a : α
r : ((Quotient.out ∘ x) a).fst ≤ i
this : (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst ≤ i
⊢ (Quotient.out (x a)).fst ∈ range fun a => (Quotient.out (x a)).fst
[PROOFSTEP]
exact ⟨a, rfl⟩
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
x y : G i
h :
  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =
    (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y
⊢ x = y
[PROOFSTEP]
rw [Quotient.eq] at h
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
x y : G i
h : Structure.Sigma.mk f i x ≈ Structure.Sigma.mk f i y
⊢ x = y
[PROOFSTEP]
obtain ⟨j, h1, _, h3⟩ := h
[GOAL]
case intro.intro.intro
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
x y : G i
j : ι
h1 w✝ : i ≤ j
h3 : ↑(f i j h1) x = ↑(f i j w✝) y
⊢ x = y
[PROOFSTEP]
exact (f i j h1).injective h3
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
n✝ : ℕ
F : Functions L n✝
x : Fin n✝ → G i
⊢ Function.Embedding.toFun
      { toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),
        inj' :=
          (_ :
            ∀ (x y : G i),
              (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =
                  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →
                x = y) }
      (funMap F x) =
    funMap F
      ({ toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),
            inj' :=
              (_ :
                ∀ (x y : G i),
                  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =
                      (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →
                    x = y) }.toFun ∘
        x)
[PROOFSTEP]
simp
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
n✝ : ℕ
F : Functions L n✝
x : Fin n✝ → G i
⊢ Quotient.mk (setoid G f) (Structure.Sigma.mk f i (funMap F x)) =
    funMap F ((fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) ∘ x)
[PROOFSTEP]
rw [← funMap_quotient_mk'_sigma_mk']
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
n✝ : ℕ
F : Functions L n✝
x : Fin n✝ → G i
⊢ (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) =
    funMap F ((fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) ∘ x)
[PROOFSTEP]
rfl
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
⊢ ∀ {n : ℕ} (r : Relations L n) (x : Fin n → G i),
    RelMap r
        ({ toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),
              inj' :=
                (_ :
                  ∀ (x y : G i),
                    (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =
                        (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →
                      x = y) }.toFun ∘
          x) ↔
      RelMap r x
[PROOFSTEP]
intro n R x
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
n : ℕ
R : Relations L n
x : Fin n → G i
⊢ RelMap R
      ({ toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),
            inj' :=
              (_ :
                ∀ (x y : G i),
                  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =
                      (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →
                    x = y) }.toFun ∘
        x) ↔
    RelMap R x
[PROOFSTEP]
change RelMap R (fun a => (⟦.mk f i (x a)⟧ : DirectLimit G f)) ↔ _
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i : ι
n : ℕ
R : Relations L n
x : Fin n → G i
⊢ (RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) ↔ RelMap R x
[PROOFSTEP]
simp only [relMap_quotient_mk'_sigma_mk']
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i j : ι
hij : i ≤ j
x : G i
⊢ ↑(of L ι G f j) (↑(f i j hij) x) = ↑(of L ι G f i) x
[PROOFSTEP]
rw [of_apply, of_apply, Quotient.eq]
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i j : ι
hij : i ≤ j
x : G i
⊢ Structure.Sigma.mk f j (↑(f i j hij) x) ≈ Structure.Sigma.mk f i x
[PROOFSTEP]
refine' Setoid.symm ⟨j, hij, refl j, _⟩
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
i j : ι
hij : i ≤ j
x : G i
⊢ ↑(f i j hij) x = ↑(f j j (_ : j ≤ j)) (↑(f i j hij) x)
[PROOFSTEP]
simp only [DirectedSystem.map_self]
[GOAL]
L : Language
ι : Type v
inst✝⁴ : Preorder ι
G : ι → Type w
inst✝³ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝² : IsDirected ι fun x x_1 => x ≤ x_1
inst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)
inst✝ : Nonempty ι
z : DirectLimit G f
⊢ ↑(of L ι G f (Quotient.out z).fst) (Quotient.out z).snd = z
[PROOFSTEP]
simp
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : Σˣ f
xy : x ≈ y
⊢ (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y
[PROOFSTEP]
simp
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : Σˣ f
xy : x ≈ y
⊢ ↑(g x.fst) x.snd = ↑(g y.fst) y.snd
[PROOFSTEP]
obtain ⟨i, hx, hy⟩ := directed_of (· ≤ ·) x.1 y.1
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : Σˣ f
xy : x ≈ y
i : ι
hx : x.fst ≤ i
hy : y.fst ≤ i
⊢ ↑(g x.fst) x.snd = ↑(g y.fst) y.snd
[PROOFSTEP]
rw [← Hg x.1 i hx, ← Hg y.1 i hy]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : Σˣ f
xy : x ≈ y
i : ι
hx : x.fst ≤ i
hy : y.fst ≤ i
⊢ ↑(g i) (↑(f x.fst i hx) x.snd) = ↑(g i) (↑(f y.fst i hy) y.snd)
[PROOFSTEP]
exact congr_arg _ ((equiv_iff ..).1 xy)
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : DirectLimit G f
xy :
  Quotient.lift (fun x => ↑(g x.fst) x.snd)
      (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
    Quotient.lift (fun x => ↑(g x.fst) x.snd)
      (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y
⊢ x = y
[PROOFSTEP]
rw [← Quotient.out_eq x, ← Quotient.out_eq y, Quotient.lift_mk, Quotient.lift_mk] at xy
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : DirectLimit G f
xy : ↑(g (Quotient.out x).fst) (Quotient.out x).snd = ↑(g (Quotient.out y).fst) (Quotient.out y).snd
⊢ x = y
[PROOFSTEP]
obtain ⟨i, hx, hy⟩ := directed_of (· ≤ ·) x.out.1 y.out.1
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : DirectLimit G f
xy : ↑(g (Quotient.out x).fst) (Quotient.out x).snd = ↑(g (Quotient.out y).fst) (Quotient.out y).snd
i : ι
hx : (Quotient.out x).fst ≤ i
hy : (Quotient.out y).fst ≤ i
⊢ x = y
[PROOFSTEP]
rw [← Hg x.out.1 i hx, ← Hg y.out.1 i hy] at xy
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : DirectLimit G f
i : ι
hx : (Quotient.out x).fst ≤ i
hy : (Quotient.out y).fst ≤ i
xy :
  ↑(g i) (↑(f (Quotient.out x).fst i hx) (Quotient.out x).snd) =
    ↑(g i) (↑(f (Quotient.out y).fst i hy) (Quotient.out y).snd)
⊢ x = y
[PROOFSTEP]
rw [← Quotient.out_eq x, ← Quotient.out_eq y, Quotient.eq, equiv_iff G f hx hy]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
x y : DirectLimit G f
i : ι
hx : (Quotient.out x).fst ≤ i
hy : (Quotient.out y).fst ≤ i
xy :
  ↑(g i) (↑(f (Quotient.out x).fst i hx) (Quotient.out x).snd) =
    ↑(g i) (↑(f (Quotient.out y).fst i hy) (Quotient.out y).snd)
⊢ ↑(f (Quotient.out x).fst i hx) (Quotient.out x).snd = ↑(f (Quotient.out y).fst i hy) (Quotient.out y).snd
[PROOFSTEP]
exact (g i).injective xy
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
F : Functions L n✝
x : Fin n✝ → DirectLimit G f
⊢ Function.Embedding.toFun
      {
        toFun :=
          Quotient.lift (fun x => ↑(g x.fst) x.snd)
            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
        inj' :=
          (_ :
            ∀ (x y : DirectLimit G f),
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                x = y) }
      (funMap F x) =
    funMap F
      ({
            toFun :=
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
            inj' :=
              (_ :
                ∀ (x y : DirectLimit G f),
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                      Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                    x = y) }.toFun ∘
        x)
[PROOFSTEP]
obtain ⟨i, y, rfl⟩ := exists_quotient_mk'_sigma_mk'_eq G f x
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
F : Functions L n✝
i : ι
y : Fin n✝ → G i
⊢ Function.Embedding.toFun
      {
        toFun :=
          Quotient.lift (fun x => ↑(g x.fst) x.snd)
            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
        inj' :=
          (_ :
            ∀ (x y : DirectLimit G f),
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                x = y) }
      (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))) =
    funMap F
      ({
            toFun :=
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
            inj' :=
              (_ :
                ∀ (x y : DirectLimit G f),
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                      Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                    x = y) }.toFun ∘
        fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a)))
[PROOFSTEP]
change _ = funMap F (Quotient.lift _ _ ∘ Quotient.mk _ ∘ Structure.Sigma.mk f i ∘ y)
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
F : Functions L n✝
i : ι
y : Fin n✝ → G i
⊢ Function.Embedding.toFun
      {
        toFun :=
          Quotient.lift (fun x => ↑(g x.fst) x.snd)
            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
        inj' :=
          (_ :
            ∀ (x y : DirectLimit G f),
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                x = y) }
      (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))) =
    funMap F
      (Quotient.lift (fun x => ↑(g x.fst) x.snd)
          (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) ∘
        Quotient.mk (setoid G f) ∘ Structure.Sigma.mk f i ∘ y)
[PROOFSTEP]
rw [funMap_quotient_mk'_sigma_mk', ← Function.comp.assoc, Quotient.lift_comp_mk]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
F : Functions L n✝
i : ι
y : Fin n✝ → G i
⊢ Function.Embedding.toFun
      {
        toFun :=
          Quotient.lift (fun x => ↑(g x.fst) x.snd)
            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
        inj' :=
          (_ :
            ∀ (x y : DirectLimit G f),
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                x = y) }
      (Quotient.mk (setoid G f) (Structure.Sigma.mk f i (funMap F fun a => y a))) =
    funMap F ((fun x => ↑(g x.fst) x.snd) ∘ Structure.Sigma.mk f i ∘ y)
[PROOFSTEP]
simp only [Quotient.lift_mk, Embedding.map_fun]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
F : Functions L n✝
i : ι
y : Fin n✝ → G i
⊢ funMap F (↑(g i) ∘ fun a => y a) = funMap F ((fun x => ↑(g x.fst) x.snd) ∘ Structure.Sigma.mk f i ∘ y)
[PROOFSTEP]
rfl
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
R : Relations L n✝
x : Fin n✝ → DirectLimit G f
⊢ RelMap R
      ({
            toFun :=
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
            inj' :=
              (_ :
                ∀ (x y : DirectLimit G f),
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                      Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                    x = y) }.toFun ∘
        x) ↔
    RelMap R x
[PROOFSTEP]
obtain ⟨i, y, rfl⟩ := exists_quotient_mk'_sigma_mk'_eq G f x
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
R : Relations L n✝
i : ι
y : Fin n✝ → G i
⊢ RelMap R
      ({
            toFun :=
              Quotient.lift (fun x => ↑(g x.fst) x.snd)
                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),
            inj' :=
              (_ :
                ∀ (x y : DirectLimit G f),
                  Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =
                      Quotient.lift (fun x => ↑(g x.fst) x.snd)
                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →
                    x = y) }.toFun ∘
        fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))) ↔
    RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))
[PROOFSTEP]
change RelMap R (Quotient.lift _ _ ∘ Quotient.mk _ ∘ Structure.Sigma.mk f i ∘ y) ↔ _
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
R : Relations L n✝
i : ι
y : Fin n✝ → G i
⊢ RelMap R
      (Quotient.lift (fun x => ↑(g x.fst) x.snd)
          (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) ∘
        Quotient.mk (setoid G f) ∘ Structure.Sigma.mk f i ∘ y) ↔
    RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))
[PROOFSTEP]
rw [relMap_quotient_mk'_sigma_mk' G f, ← (g i).map_rel R y, ← Function.comp.assoc, Quotient.lift_comp_mk]
[GOAL]
case intro.intro
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
n✝ : ℕ
R : Relations L n✝
i : ι
y : Fin n✝ → G i
⊢ RelMap R ((fun x => ↑(g x.fst) x.snd) ∘ Structure.Sigma.mk f i ∘ y) ↔ RelMap R (↑(g i) ∘ y)
[PROOFSTEP]
rfl
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
i : ι
x : G i
⊢ ↑(lift L ι G f g Hg) (Quotient.mk (setoid G f) (Structure.Sigma.mk f i x)) = ↑(g i) x
[PROOFSTEP]
change (lift L ι G f g Hg).toFun ⟦.mk f i x⟧ = _
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
i : ι
x : G i
⊢ Function.Embedding.toFun (lift L ι G f g Hg).toEmbedding (Quotient.mk (setoid G f) (Structure.Sigma.mk f i x)) =
    ↑(g i) x
[PROOFSTEP]
simp only [lift, Quotient.lift_mk]
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
i : ι
x : G i
⊢ ↑(lift L ι G f g Hg) (↑(of L ι G f i) x) = ↑(g i) x
[PROOFSTEP]
simp
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
F : DirectLimit G f ↪[L] P
x✝ : DirectLimit G f
i j : ι
hij : i ≤ j
x : G i
⊢ ↑((fun i => Embedding.comp F (of L ι G f i)) j) (↑(f i j hij) x) = ↑((fun i => Embedding.comp F (of L ι G f i)) i) x
[PROOFSTEP]
rw [F.comp_apply, F.comp_apply, of_f]
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
F : DirectLimit G f ↪[L] P
x✝ : DirectLimit G f
i : ι
x : G i
⊢ ↑F (↑(of L ι G f i) x) =
    ↑(lift L ι G f (fun i => Embedding.comp F (of L ι G f i))
          (_ :
            ∀ (i j : ι) (hij : i ≤ j) (x : G i),
              ↑((fun i => Embedding.comp F (of L ι G f i)) j) (↑(f i j hij) x) =
                ↑((fun i => Embedding.comp F (of L ι G f i)) i) x))
      (↑(of L ι G f i) x)
[PROOFSTEP]
rw [lift_of]
[GOAL]
L : Language
ι : Type v
inst✝⁵ : Preorder ι
G : ι → Type w
inst✝⁴ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : DirectedSystem G fun i j h => ↑(f i j h)
inst✝¹ : Nonempty ι
P : Type u₁
inst✝ : Structure L P
g : (i : ι) → G i ↪[L] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x
F : DirectLimit G f ↪[L] P
x✝ : DirectLimit G f
i : ι
x : G i
⊢ ↑F (↑(of L ι G f i) x) = ↑(Embedding.comp F (of L ι G f i)) x
[PROOFSTEP]
rfl
[GOAL]
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
⊢ CG L (DirectLimit G f)
[PROOFSTEP]
refine' ⟨⟨⋃ i, DirectLimit.of L ι G f i '' Classical.choose (h i).out, _, _⟩⟩
[GOAL]
case refine'_1
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
⊢ Set.Countable (⋃ (i : ι), ↑(of L ι G f i) '' Classical.choose (_ : Substructure.CG ⊤))
[PROOFSTEP]
exact Set.countable_iUnion fun i => Set.Countable.image (Classical.choose_spec (h i).out).1 _
[GOAL]
case refine'_2
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
⊢ LowerAdjoint.toFun (Substructure.closure L) (⋃ (i : ι), ↑(of L ι G f i) '' Classical.choose (_ : Substructure.CG ⊤)) =
    ⊤
[PROOFSTEP]
rw [eq_top_iff, Substructure.closure_unionᵢ]
[GOAL]
case refine'_2
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
⊢ ⊤ ≤
    ⨆ (i : ι), LowerAdjoint.toFun (Substructure.closure L) (↑(of L ι G f i) '' Classical.choose (_ : Substructure.CG ⊤))
[PROOFSTEP]
simp_rw [← Embedding.coe_toHom, Substructure.closure_image]
[GOAL]
case refine'_2
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
⊢ ⊤ ≤
    ⨆ (i : ι),
      Substructure.map (Embedding.toHom (of L ι G f i))
        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤)))
[PROOFSTEP]
rw [le_iSup_iff]
[GOAL]
case refine'_2
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
⊢ ∀ (b : Substructure L (DirectLimit G f)),
    (∀ (i : ι),
        Substructure.map (Embedding.toHom (of L ι G f i))
            (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤
          b) →
      ⊤ ≤ b
[PROOFSTEP]
intro S hS x _
[GOAL]
case refine'_2
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
S : Substructure L (DirectLimit G f)
hS :
  ∀ (i : ι),
    Substructure.map (Embedding.toHom (of L ι G f i))
        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤
      S
x : DirectLimit G f
a✝ : x ∈ ⊤
⊢ x ∈ S
[PROOFSTEP]
let out := Quotient.out (s := DirectLimit.setoid G f)
[GOAL]
case refine'_2
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
S : Substructure L (DirectLimit G f)
hS :
  ∀ (i : ι),
    Substructure.map (Embedding.toHom (of L ι G f i))
        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤
      S
x : DirectLimit G f
a✝ : x ∈ ⊤
out : Quotient (setoid G f) → Σˣ f := Quotient.out
⊢ x ∈ S
[PROOFSTEP]
refine' hS (out x).1 ⟨(out x).2, _, _⟩
[GOAL]
case refine'_2.refine'_1
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
S : Substructure L (DirectLimit G f)
hS :
  ∀ (i : ι),
    Substructure.map (Embedding.toHom (of L ι G f i))
        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤
      S
x : DirectLimit G f
a✝ : x ∈ ⊤
out : Quotient (setoid G f) → Σˣ f := Quotient.out
⊢ (out x).snd ∈ ↑(LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤)))
[PROOFSTEP]
rw [(Classical.choose_spec (h (out x).1).out).2]
[GOAL]
case refine'_2.refine'_1
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
S : Substructure L (DirectLimit G f)
hS :
  ∀ (i : ι),
    Substructure.map (Embedding.toHom (of L ι G f i))
        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤
      S
x : DirectLimit G f
a✝ : x ∈ ⊤
out : Quotient (setoid G f) → Σˣ f := Quotient.out
⊢ (out x).snd ∈ ↑⊤
[PROOFSTEP]
trivial
[GOAL]
case refine'_2.refine'_2
L : Language
ι✝ : Type v
inst✝¹¹ : Preorder ι✝
G✝ : ι✝ → Type w
inst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)
f✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j
inst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1
inst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)
inst✝⁷ : Nonempty ι✝
P : Type u₁
inst✝⁶ : Structure L P
g : (i : ι✝) → G✝ i ↪[L] P
Hg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x
ι : Type u_1
inst✝⁵ : Encodable ι
inst✝⁴ : Preorder ι
inst✝³ : IsDirected ι fun x x_1 => x ≤ x_1
inst✝² : Nonempty ι
G : ι → Type w
inst✝¹ : (i : ι) → Structure L (G i)
f : (i j : ι) → i ≤ j → G i ↪[L] G j
h : ∀ (i : ι), CG L (G i)
inst✝ : DirectedSystem G fun i j h => ↑(f i j h)
S : Substructure L (DirectLimit G f)
hS :
  ∀ (i : ι),
    Substructure.map (Embedding.toHom (of L ι G f i))
        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤
      S
x : DirectLimit G f
a✝ : x ∈ ⊤
out : Quotient (setoid G f) → Σˣ f := Quotient.out
⊢ ↑(Embedding.toHom (of L ι G f (out x).fst)) (out x).snd = x
[PROOFSTEP]
simp only [Embedding.coe_toHom, DirectLimit.of_apply, Sigma.eta, Quotient.out_eq]