File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
LogicFormalization/Chapter2/Section4 Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ end a
108108
109109section b
110110
111- /-- Represents polynomials with coefficients from `ℕ`.-/
111+ /-- Represents polynomials with coefficients from `ℕ`. -/
112112inductive Poly
113113| const: ℕ → Poly
114114| var
@@ -127,8 +127,7 @@ lemma eval_mono: ∀ {p: Poly}, Monotone p.eval
127127| .const _ => fun _ _ _ => Nat.le_refl _
128128| .var => fun _ _ => id
129129| .add _ _ => Monotone.add eval_mono eval_mono
130- | .mul _
131- _ => Monotone.mul' eval_mono eval_mono
130+ | .mul _ _ => Monotone.mul' eval_mono eval_mono
132131
133132/-- Degree of a polynomial -/
134133def deg : Poly → ℕ
@@ -263,9 +262,17 @@ theorem not_exists_nat_rig_term₂ : ¬∃ (t: Term .Rig) (x: Var) (hx: AreVarsF
263262end b
264263
265264open Structure in
266- /-- 2.4 #5 (c). The only substructure of `𝒩` is `𝒩` itself. -/
267- theorem 𝒩.substructures : ∀ {M: Set ℕ} [Nonempty M] {ℳ: Structure .Rig M},
268- ℳ ⊆ 𝒩 ↔ HEq ℳ 𝒩 :=
269- sorry
270265
266+ /-- 2.4 #5 (c). The only substructure of `𝒩` is `𝒩` itself. -/
267+ theorem 𝒩.substructures {M: Set ℕ} [Nonempty M] {ℳ: Structure .Rig M}:
268+ (Structure.IsSubstructure ℳ 𝒩) → M = Set.univ
269+ | ⟨h₁, _⟩ => Set.eq_univ_of_forall (all_mem_M h₁)
270+ where all_mem_M
271+ (h: ∀ (F : Language.Rig.ϝ) (a : Fin (arity F) → ↑M), (𝒩.interpFun F fun x => ↑(a x)) ∈ M):
272+ (n: ℕ) → n ∈ M
273+ | 0 => h .zero ![]
274+ | k + 1 =>
275+ h .add ![⟨k, all_mem_M h k⟩, ⟨1 , h .one ![]⟩]
276+
277+ -- TODO: maybe show other way too? Should be trivial though
271278end Problem5
You can’t perform that action at this time.
0 commit comments