Converting a Chapter 3 function f: Function X Y to a Mathlib function f: X → Y.
The Chapter 3 definition of a function was nonconstructive, so we have to use the
axiom of choice here.
Instances For
Equations
- Chapter3.Function.inst_coefn X Y = { coe := Chapter3.Function.to_fn }
Example 3.3.3.
Equations
Instances For
Equations
- Chapter3.SetTheory.Set.f_3_3_3a = { P := Chapter3.P_3_3_3a, unique := ⋯ }
Instances For
Equations
Instances For
Equations
- Chapter3.SetTheory.Set.f_3_3_3c = { P := Chapter3.SetTheory.Set.P_3_3_3c, unique := ⋯ }
Instances For
Equations
- Chapter3.SetTheory.Set.f_3_3_5 = { P := Chapter3.SetTheory.Set.P_3_3_5, unique := ⋯ }
Instances For
Example 3.3.10 (simplified). The second part of the example is tricky to replicate in this formalism, so a Mathlib substitute is offered instead.
Equations
Instances For
Equations
- Chapter3.SetTheory.Set.f_3_3_10b = Chapter3.Function.mk_fn fun (x : Chapter3.Nat.toSubtype) => ↑((Chapter3.SetTheory.Set.nat_equiv.symm x + 1) ^ 2)
Instances For
Equations
- Chapter3.«term_○_» = Lean.ParserDescr.trailingNode `Chapter3.«term_○_» 90 91 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "○") (Lean.ParserDescr.cat `term 91))
Instances For
Example 3.3.14
Equations
Instances For
Equations
Instances For
Compatibility with Mathlib's Function.Injective. You may wish to use the unfold tactic to
understand Mathlib concepts such as Function.Injective.
Example 3.3.18. One half of the example requires the integers, and so is expressed using Mathlib functions instead of Chapter 3 functions.
Compatibility with Mathlib's Function.Surjective
Compatibility with Mathlib's Function.Bijective
Example 3.3.24 (using Mathlib)
Equations
Instances For
Equations
Instances For
Equations
Instances For
We cannot use the notation f⁻¹ for the inverse because in Mathlib's Inv class, the inverse
of f must be exactly of the same type of f, and Function Y X is a different type from
Function X Y.
Equations
Instances For
Exercise 3.3.1. Although a proof operating directly on functions would be shorter,
the spirit of the exercise is to show these using the Function.eq_iff definition.
Exercise 3.3.2
Exercise 3.3.3 - fill in the sorrys in the statements in a reasonable fashion.
Exercise 3.3.5.
Equations
Instances For
Exercise 3.3.8
Equations
- Chapter3.Function.inclusion h = Chapter3.Function.mk_fn fun (x : X.toSubtype) => ⟨↑x, ⋯⟩
Instances For
Equations
- Chapter3.Function.id X = Chapter3.Function.mk_fn fun (x : X.toSubtype) => x