Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions Mathlib/ModelTheory/LanguageMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -449,19 +449,18 @@ end

open FirstOrder

instance constantsOnSelfStructure : (constantsOn M).Structure M :=
constantsOn.structure id
variable (α : Type*) [(constantsOn α).Structure M]

instance withConstantsSelfStructure : L[[M]].Structure M :=
instance withConstantsStructure : L[[α]].Structure M :=
inferInstanceAs <| (L.sum _).Structure M

instance withConstants_self_expansion : (lhomWithConstants L M).IsExpansionOn M :=
⟨fun _ _ => rfl, fun _ _ => rfl⟩
instance constantsOnSelfStructure : (constantsOn M).Structure M :=
fast_instance% constantsOn.structure id

variable (α : Type*) [(constantsOn α).Structure M]
instance withConstantsSelfStructure : L[[M]].Structure M := inferInstance

instance withConstantsStructure : L[[α]].Structure M :=
inferInstanceAs <| (L.sum _).Structure M
instance withConstants_self_expansion : (lhomWithConstants L M).IsExpansionOn M :=
⟨fun _ _ => rfl, fun _ _ => rfl⟩

instance withConstants_expansion : (L.lhomWithConstants α).IsExpansionOn M :=
⟨fun _ _ => rfl, fun _ _ => rfl⟩
Expand Down Expand Up @@ -510,9 +509,9 @@ def Embedding.withConstants (_f : M ↪[L] N) (_A : Set M) : Type w' := N
deriving L.Structure

instance (f : M ↪[L] N) : (constantsOn A).Structure (f.withConstants A) :=
constantsOn.structure fun a => f a
fast_instance% constantsOn.structure fun a => f a

instance : L[[A]].Structure (f.withConstants A) := L.withConstantsStructure A
instance : L[[A]].Structure (f.withConstants A) := inferInstance

/-- Lifts an embedding to the expanded language with constants. -/
def Embedding.liftWithConstants :
Expand Down
Loading