Mathlib references

Every Mathlib declaration referred to directly by this project’s own code, grouped by the module it comes from.

definition abbreviation theorem
legend

Algebra.BigOperators.Fin

theorem Fin.sum_univ_add.{u_2} {M : Type u_2} [AddCommMonoid M] {a b : } (f : Fin (a + b)  M) :
   i, f i =  i, f (Fin.castAdd b i) +  i, f (Fin.natAdd a i)
theorem Fin.sum_univ_one.{u_2} {M : Type u_2} [AddCommMonoid M] (f : Fin 1  M) :  i, f i = f 0
theorem Fin.sum_univ_two.{u_2} {M : Type u_2} [AddCommMonoid M] (f : Fin 2  M) :  i, f i = f 0 + f 1

Algebra.BigOperators.Group.Finset.Basic

theorem Finset.sum_congr.{u_1, u_4} {ι : Type u_1} {M : Type u_4} {s s : Finset ι} [AddCommMonoid M]
  {f g : ι  M} (h : s = s) : ( x  s, f x = g x)  s₁.sum f = s₂.sum g

Algebra.BigOperators.Group.Finset.Defs

∑ x ∈ s, f x is the sum of f x as x ranges over the elements of the finite set s.

When the index type is a Fintype, the notation ∑ x, f x, is a shorthand for ∑ x ∈ Finset.univ, f x.

def Finset.sum.{u_1, u_3} {ι : Type u_1} {M : Type u_3} [AddCommMonoid M] (s : Finset ι) (f : ι  M) : M

Algebra.BigOperators.Ring.Finset

theorem Nat.cast_sum.{u_4, u_5} {R : Type u_4} {ι : Type u_5} [AddCommMonoidWithOne R] (s : Finset ι)
  (f : ι  ) : ( x  s, f x) =  x  s, (f x)

Used by: Discrete.pi

Algebra.Group.Basic

theorem sub_add_sub_cancel.{u_3} {G : Type u_3} [AddGroup G] (a b c : G) : a - b + (b - c) = a - c

Algebra.Group.Defs

theorem add_zero.{u} {M : Type u} [AddZeroClass M] (a : M) : a + 0 = a
theorem one_pow.{u_2} {M : Type u_2} [Monoid M] (n : ) : 1 ^ n = 1
theorem pow_add.{u_2} {M : Type u_2} [Monoid M] (a : M) (m n : ) : a ^ (m + n) = a ^ m * a ^ n
theorem pow_mul.{u_2} {M : Type u_2} [Monoid M] (a : M) (m n : ) : a ^ (m * n) = (a ^ m) ^ n
theorem pow_succ.{u_2} {M : Type u_2} [Monoid M] (a : M) (n : ) : a ^ (n + 1) = a ^ n * a
theorem pow_zero.{u_2} {M : Type u_2} [Monoid M] (a : M) : a ^ 0 = 1
theorem sub_self.{u_1} {G : Type u_1} [AddGroup G] (a : G) : a - a = 0
theorem zero_add.{u} {M : Type u} [AddZeroClass M] (a : M) : 0 + a = a

Algebra.GroupWithZero.Units.Basic

theorem div_eq_iff.{u_3} {G : Type u_3} [GroupWithZero G] {a b c : G} (hb : b  0) :
  a / b = c  a = c * b

Algebra.Order.BigOperators.Group.Finset

theorem Finset.sum_nonneg.{u_1, u_5} {ι : Type u_1} {N : Type u_5} [AddCommMonoid N] [Preorder N]
  {f : ι  N} {s : Finset ι} [AddLeftMono N] (h :  i  s, 0  f i) : 0   i  s, f i

Algebra.Order.Monoid.Unbundled.Basic

Alias of Left.add_nonneg.

theorem add_nonneg.{u_1} {α : Type u_1} [AddZeroClass α] [Preorder α] [AddLeftMono α] {a b : α} (ha : 0  a)
  (hb : 0  b) : 0  a + b

Algebra.Order.Ring.Unbundled.Rat

theorem Rat.num_pos {a : } : 0 < a.num  0 < a

Algebra.Order.Sub.Defs

theorem add_tsub_cancel_left.{u_1} {α : Type u_1} [PartialOrder α] [AddCommSemigroup α] [Sub α]
  [OrderedSub α] [AddLeftReflectLE α] (a b : α) : a + b - a = b

Algebra.Ring.Defs

theorem add_one_mul.{u} {α : Type u} [Add α] [MulOneClass α] [RightDistribClass α] (a b : α) :
  (a + 1) * b = a * b + b

Algebra.Ring.Rat

theorem Rat.num_div_den (r : ) : r.num / r.den = r

Analysis.Normed.Group.Defs

Auxiliary class, endowing a type E with a function norm : E → ℝ with notation ‖x‖. This class is designed to be extended in more interesting classes specifying the properties of the norm.

structure Norm.{u_8} (E : Type u_8) : Type u_8

Used by: Channel, Channel.capacity, Channel.loss, Channel.lossless, Channel.lossless_stationary, Channel.lossy_loses_overall, Channel.overall_loss, Channel.system, Component.Func.Conserves, Component.Func.toImpl, Component.Impl, Component.Impl.Arrow, Component.Impl.Arrow.Equiv, Component.Impl.Arrow.setoid, Component.Impl.Demultiplex, Component.Impl.Hom, Component.Impl.Hom.comp, Component.Impl.Hom.comp_assoc, Component.Impl.Hom.comp_eqToHom, Component.Impl.Hom.comp_id, Component.Impl.Hom.eqToHom_comp, Component.Impl.Hom.eqToHom_eq_recast_id, Component.Impl.Hom.hexagon_forward, Component.Impl.Hom.hexagon_reverse, Component.Impl.Hom.id, Component.Impl.Hom.id_comp, Component.Impl.Hom.recast, Component.Impl.Hom.recast_eqToHom, Component.Impl.Hom.recast_recast, Component.Impl.Hom.symmetry, Component.Impl.Hom.symmetry_symmetry, Component.Impl.Hom.tensor, Component.Impl.Hom.tensorUnit, Component.Impl.Hom.tensor_assoc, Component.Impl.Hom.tensor_comm, Component.Impl.Hom.tensor_comp_tensor, Component.Impl.Hom.tensor_empty, Component.Impl.Hom.tensor_id_id, Component.Impl.Hom.tensor_recast_left, Component.Impl.Hom.tensor_recast_right, Component.Impl.Hom.toSpec, Component.Impl.Hom.toSpec_comp, Component.Impl.Hom.toSpec_id, Component.Impl.Multiplex, Component.Impl.PROP, Component.Impl.Simplex, Component.Impl.Simplex.toInformationSystem, Component.Impl.braidedCategory, Component.Impl.braiding, Component.Impl.braiding_naturality_left, Component.Impl.braiding_naturality_right, Component.Impl.category, Component.Impl.empty, Component.Impl.empty_parallel, Component.Impl.equivalent_of_stationary, Component.Impl.hexagon_forward_arrow, Component.Impl.hexagon_reverse_arrow, Component.Impl.id, Component.Impl.id_sequential, Component.Impl.interchange, Component.Impl.monoidalCategory, Component.Impl.monoidalCategoryStruct, Component.Impl.parallel, Component.Impl.parallel_assoc, Component.Impl.parallel_comm, Component.Impl.parallel_congr, Component.Impl.parallel_empty, Component.Impl.recast, Component.Impl.recast_congr, Component.Impl.recast_parallel_left, Component.Impl.recast_parallel_right, Component.Impl.recast_recast, Component.Impl.sequential, Component.Impl.sequential_assoc, Component.Impl.sequential_congr, Component.Impl.sequential_id, Component.Impl.symmetry, Component.Impl.symmetry_symmetry, Component.Impl.toFunc, Component.Impl.toSpecFunctor, Discrete, Discrete.pi, Discrete.prod, Discrete.size, Discrete.size_eq, InformationSystem, InformationSystem.Environment, InformationSystem.Environment.ownState, InformationSystem.Environment.universe, InformationSystem.Environment.universe_isolated, InformationSystem.Run, InformationSystem.Run.cycle, InformationSystem.Run.final, InformationSystem.Run.initial, InformationSystem.Run.trajectory, InformationSystem.Run.trajectory_head, InformationSystem.Spontaneous, InformationSystem.Step, InformationSystem.Step.bottom, InformationSystem.Step.delta, InformationSystem.Step.delta_alt, InformationSystem.Step.delta_trichotomy, InformationSystem.Step.gains, InformationSystem.Step.loses, InformationSystem.delta, InformationSystem.equivalent, InformationSystem.equivalent_output, InformationSystem.equivalent_step, InformationSystem.eval, InformationSystem.eval_append, InformationSystem.eval_delta, InformationSystem.eval_trichotomy, InformationSystem.exists_repeat_equivalent, InformationSystem.exists_repeat_state, InformationSystem.gatedFlow, InformationSystem.gatedFlow_success_AB, InformationSystem.gatedFlow_success_BA, InformationSystem.irreversible, InformationSystem.isolated, InformationSystem.natural, InformationSystem.not_spontaneous_and_perpetuous, InformationSystem.parallel, InformationSystem.parallel_delta, InformationSystem.perpetuous, InformationSystem.perpetuous_coherent, InformationSystem.reversible, InformationSystem.roundtrip_neutral, InformationSystem.sequential, InformationSystem.sequential_delta, InformationSystem.spontaneous, InformationSystem.spontaneous_no_self_return, InformationSystem.spontaneous_not_perpetuous, InformationSystem.stepAt, InformationSystem.toSimplex, InformationSystem.zero_run_le, Interface, Interface.homogeneous, Interface.tensor, Interface.unit, Layer, LayeredArchitecture, NetworkArchitecture, NormNonneg, instBraidedCategoryPROP, instCategoryPROP, instMonoidalCategoryPROP, instNormBit, instNormBool_computerNetworks, instNormCell, instNormEnvelope, instNormForallFin_computerNetworks, instNormNonnegForallFin, instNormNonnegProd, instNormProd_computerNetworks, instNormState, instNormUnit_computerNetworks, instNormValue, maxWireSize, totalSize

Analysis.SpecialFunctions.Log.Base

The real logarithm in a given base. As with the natural logarithm, we define logb b x to be logb b |x| for x < 0, and 0 for x = 0.

def Real.logb (b x : ) : 
theorem Real.rpow_logb {b x : } (b_pos : 0 < b) (b_ne_one : b  1) (hx : 0 < x) : b ^ Real.logb b x = x

Analysis.SpecialFunctions.Pow.Real

theorem Real.rpow_lt_rpow_left_iff {x y z : } (hx : 1 < x) : x ^ y < x ^ z  y < z
theorem Real.rpow_mul {x : } (hx : 0  x) (y z : ) : x ^ (y * z) = (x ^ y) ^ z
theorem Real.rpow_natCast (x : ) (n : ) : x ^ n = x ^ n
theorem Real.rpow_zero (x : ) : x ^ 0 = 1

CategoryTheory.Category.Basic

The typeclass Category C describes morphisms associated to objects of type C. The universe levels of the objects and morphisms are unconstrained, and will often need to be specified explicitly, as Category.{v} C. (See also LargeCategory and SmallCategory.)

structure CategoryTheory.Category.{v, u} (obj : Type u) : Type (max u (v + 1))

CategoryTheory.EqToHom

An equality X = Y gives us an isomorphism X ≅ Y.

It is typically better to use this, rather than rewriting by the equality then using Iso.refl _ which usually leads to dependent type theory hell.

def CategoryTheory.eqToIso.{v, u} {C : Type u} [CategoryTheory.Category.{v, u} C] {X Y : C}
  (p : X = Y) : X  Y
theorem CategoryTheory.eqToIso.hom.{v, u} {C : Type u} [CategoryTheory.Category.{v, u} C] {X Y : C}
  (p : X = Y) : (CategoryTheory.eqToIso p).hom = CategoryTheory.eqToHom p
theorem CategoryTheory.eqToIso.inv.{v, u} {C : Type u} [CategoryTheory.Category.{v, u} C] {X Y : C}
  (p : X = Y) : (CategoryTheory.eqToIso p).inv = CategoryTheory.eqToHom 

CategoryTheory.Functor.Basic

Functor C D represents a functor between categories C and D.

To apply a functor F to an object use F.obj X, and to a morphism use F.map f.

The axiom map_id expresses preservation of identities, and map_comp expresses functoriality.

structure CategoryTheory.Functor.{v, v, u, u} (C : Type u) [CategoryTheory.Category.{v, u} C]
  (D : Type u) [CategoryTheory.Category.{v, u} D] : Type (max v v u u)

CategoryTheory.Iso

An isomorphism (a.k.a. an invertible morphism) between two objects of a category. The inverse morphism is bundled.

See also CategoryTheory.Core for the category with the same objects and isomorphisms playing the role of morphisms.

structure CategoryTheory.Iso.{v, u} {C : Type u} [CategoryTheory.Category.{v, u} C] (X Y : C) : Type v

CategoryTheory.Monoidal.Braided.Basic

A braided monoidal category is a monoidal category equipped with a braiding isomorphism β_ X Y : X ⊗ Y ≅ Y ⊗ X which is natural in both arguments, and also satisfies the two hexagon identities.

structure CategoryTheory.BraidedCategory.{v, u} (C : Type u) [CategoryTheory.Category.{v, u} C]
  [CategoryTheory.MonoidalCategory C] : Type (max u v)

CategoryTheory.Monoidal.Category

In a monoidal category, we can take the tensor product of objects, X ⊗ Y and of morphisms f ⊗ₘ g. Tensor product does not need to be strictly associative on objects, but there is a specified associator, α_ X Y Z : (X ⊗ Y) ⊗ Z ≅ X ⊗ (Y ⊗ Z). There is a tensor unit 1_ C, with specified left and right unitor isomorphisms λ_ X : 1_ C ⊗ X ≅ X and ρ_ X : X ⊗ 1_ C ≅ X. These associators and unitors satisfy the pentagon and triangle equations.

structure CategoryTheory.MonoidalCategory.{v, u} (C : Type u) [C : CategoryTheory.Category.{v, u} C] :
  Type (max u v)

A constructor for monoidal categories that requires tensorHom instead of whiskerLeft and whiskerRight.

abbrev CategoryTheory.MonoidalCategory.ofTensorHom.{v, u} {C : Type u} [CategoryTheory.Category.{v, u} C]
  [CategoryTheory.MonoidalCategoryStruct C]
  (id_tensorHom_id :
     (X X : C),
      CategoryTheory.MonoidalCategoryStruct.tensorHom (CategoryTheory.CategoryStruct.id X)
          (CategoryTheory.CategoryStruct.id X) =
        CategoryTheory.CategoryStruct.id
          (CategoryTheory.MonoidalCategoryStruct.tensorObj X X) := by
    cat_disch)
  (id_tensorHom :
     (X : C) {Y Y : C} (f : Y  Y),
      CategoryTheory.MonoidalCategoryStruct.tensorHom (CategoryTheory.CategoryStruct.id X) f =
        CategoryTheory.MonoidalCategoryStruct.whiskerLeft X f := by
    cat_disch)
  (tensorHom_id :
     {X X : C} (f : X  X) (Y : C),
      CategoryTheory.MonoidalCategoryStruct.tensorHom f (CategoryTheory.CategoryStruct.id Y) =
        CategoryTheory.MonoidalCategoryStruct.whiskerRight f Y := by
    cat_disch)
  (tensorHom_comp_tensorHom :
     {X Y Z X Y Z : C} (f : X  Y) (f : X  Y) (g : Y  Z) (g : Y  Z),
      CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategoryStruct.tensorHom f f)
          (CategoryTheory.MonoidalCategoryStruct.tensorHom g g) =
        CategoryTheory.MonoidalCategoryStruct.tensorHom (CategoryTheory.CategoryStruct.comp f g)
          (CategoryTheory.CategoryStruct.comp f g) := by
    cat_disch)
  (associator_naturality :
     {X X X Y Y Y : C} (f : X  Y) (f : X  Y) (f : X  Y),
      CategoryTheory.CategoryStruct.comp
          (CategoryTheory.MonoidalCategoryStruct.tensorHom
            (CategoryTheory.MonoidalCategoryStruct.tensorHom f f) f)
          (CategoryTheory.MonoidalCategoryStruct.associator Y Y Y).hom =
        CategoryTheory.CategoryStruct.comp
          (CategoryTheory.MonoidalCategoryStruct.associator X X X).hom
          (CategoryTheory.MonoidalCategoryStruct.tensorHom f
            (CategoryTheory.MonoidalCategoryStruct.tensorHom f f)) := by
    cat_disch)
  (leftUnitor_naturality :
     {X Y : C} (f : X  Y),
      CategoryTheory.CategoryStruct.comp
          (CategoryTheory.MonoidalCategoryStruct.tensorHom
            (CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategoryStruct.tensorUnit C))
            f)
          (CategoryTheory.MonoidalCategoryStruct.leftUnitor Y).hom =
        CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategoryStruct.leftUnitor X).hom
          f := by
    cat_disch)
  (rightUnitor_naturality :
     {X Y : C} (f : X  Y),
      CategoryTheory.CategoryStruct.comp
          (CategoryTheory.MonoidalCategoryStruct.tensorHom f
            (CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategoryStruct.tensorUnit C)))
          (CategoryTheory.MonoidalCategoryStruct.rightUnitor Y).hom =
        CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategoryStruct.rightUnitor X).hom
          f := by
    cat_disch)
  (pentagon :
     (W X Y Z : C),
      CategoryTheory.CategoryStruct.comp
          (CategoryTheory.MonoidalCategoryStruct.tensorHom
            (CategoryTheory.MonoidalCategoryStruct.associator W X Y).hom
            (CategoryTheory.CategoryStruct.id Z))
          (CategoryTheory.CategoryStruct.comp
            (CategoryTheory.MonoidalCategoryStruct.associator W
                (CategoryTheory.MonoidalCategoryStruct.tensorObj X Y) Z).hom
            (CategoryTheory.MonoidalCategoryStruct.tensorHom (CategoryTheory.CategoryStruct.id W)
              (CategoryTheory.MonoidalCategoryStruct.associator X Y Z).hom)) =
        CategoryTheory.CategoryStruct.comp
          (CategoryTheory.MonoidalCategoryStruct.associator
              (CategoryTheory.MonoidalCategoryStruct.tensorObj W X) Y Z).hom
          (CategoryTheory.MonoidalCategoryStruct.associator W X
              (CategoryTheory.MonoidalCategoryStruct.tensorObj Y Z)).hom := by
    cat_disch)
  (triangle :
     (X Y : C),
      CategoryTheory.CategoryStruct.comp
          (CategoryTheory.MonoidalCategoryStruct.associator X
              (CategoryTheory.MonoidalCategoryStruct.tensorUnit C) Y).hom
          (CategoryTheory.MonoidalCategoryStruct.tensorHom (CategoryTheory.CategoryStruct.id X)
            (CategoryTheory.MonoidalCategoryStruct.leftUnitor Y).hom) =
        CategoryTheory.MonoidalCategoryStruct.tensorHom
          (CategoryTheory.MonoidalCategoryStruct.rightUnitor X).hom
          (CategoryTheory.CategoryStruct.id Y) := by
    cat_disch) :
  CategoryTheory.MonoidalCategory C

Auxiliary structure to carry only the data fields of (and provide notation for) MonoidalCategory.

structure CategoryTheory.MonoidalCategoryStruct.{v, u} (C : Type u) [C : CategoryTheory.Category.{v, u} C] :
  Type (max u v)

Data.Fin.Tuple.Basic

theorem Fin.append_assoc.{u_1} {m n : } {α : Sort u_1} {p : } (a : Fin m  α) (b : Fin n  α)
  (c : Fin p  α) : Fin.append (Fin.append a b) c = Fin.append a (Fin.append b c)  Fin.cast 
theorem Fin.append_castAdd_natAdd.{u_1} {m n : } {α : Sort u_1} {f : Fin (m + n)  α} :
  (Fin.append (fun i => f (Fin.castAdd n i)) fun i => f (Fin.natAdd m i)) = f
theorem Fin.append_elim0.{u_1} {m : } {α : Sort u_1} (u : Fin m  α) :
  Fin.append u Fin.elim0 = u  Fin.cast 
theorem Fin.append_left_nil.{u_1} {m n : } {α : Sort u_1} (u : Fin m  α) (v : Fin n  α) (hu : m = 0) :
  Fin.append u v = v  Fin.cast 

Data.Finset.BooleanAlgebra

theorem Finset.univ_eq_empty.{u_1} {α : Type u_1} [Fintype α] [IsEmpty α] : Finset.univ = 
theorem Finset.univ_nonempty.{u_1} {α : Type u_1} [Fintype α] [Nonempty α] : Finset.univ.Nonempty

Used by: maxWireSize

Data.Finset.Card

s.card is the number of elements of s, aka its cardinality.

The notation #s can be accessed in the Finset locale.

def Finset.card.{u_1} {α : Type u_1} (s : Finset α) : 
theorem Finset.card_filter_le.{u_1} {α : Type u_1} (s : Finset α) (p : α  Prop) [DecidablePred p] :
  (Finset.filter p s).card  s.card
theorem Finset.card_lt_card.{u_1} {α : Type u_1} {s t : Finset α} (h : s  t) : s.card < t.card

Data.Finset.Defs

Finset α is the type of finite sets of elements of α. It is implemented as a multiset (a list up to permutation) which has no duplicate elements.

structure Finset.{u_4} (α : Type u_4) : Type u_4
theorem Finset.ext_iff.{u_1} {α : Type u_1} {s s : Finset α} : s = s   (a : α), a  s  a  s

Data.Finset.Filter

Finset.filter p s is the set of elements of s that satisfy p.

For example, one can use s.filter (· ∈ t) to get the intersection of s with t : Set α as a Finset α (when a DecidablePred (· ∈ t) instance is available).

def Finset.filter.{u_1} {α : Type u_1} (p : α  Prop) [DecidablePred p] (s : Finset α) : Finset α
theorem Finset.mem_filter.{u_1} {α : Type u_1} {p : α  Prop} [DecidablePred p] {s : Finset α} {a : α} :
  a  Finset.filter p s  a  s  p a

Data.Finset.Lattice.Fold

Given nonempty finset s then s.sup' H f is the supremum of its image under f in (possibly unbounded) join-semilattice α, where H is a proof of nonemptiness. If α has a bottom element you may instead use Finset.sup which does not require s nonempty.

def Finset.sup'.{u_2, u_3} {α : Type u_2} {β : Type u_3} [SemilatticeSup α] (s : Finset β)
  (H : s.Nonempty) (f : β  α) : α

Used by: maxWireSize

Data.Fintype.BigOperators

theorem Fintype.card_fun.{u_1, u_2} {α : Type u_1} {β : Type u_2} [DecidableEq α] [Fintype α] [Fintype β] :
  Fintype.card (α  β) = Fintype.card β ^ Fintype.card α

Data.Fintype.Card

theorem Finite.injective_iff_surjective.{u_1} {α : Type u_1} [Finite α] {f : α  α} :
  Function.Injective f  Function.Surjective f
theorem Fintype.card_bool : Fintype.card Bool = 2

Used by: card_BitSequence

theorem Fintype.card_fin (n : ) : Fintype.card (Fin n) = n

Data.Fintype.Defs

theorem Finset.mem_univ.{u_1} {α : Type u_1} [Fintype α] (x : α) : x  Finset.univ

Fintype α means that α is finite, i.e. there are only finitely many distinct elements of type α. The evidence of this is a finset elems (a list up to permutation without duplicates), together with a proof that everything of type α is in the list.

structure Fintype.{u_4} (α : Type u_4) : Type u_4

Data.Fintype.Pigeonhole

The pigeonhole principle for finitely many pigeons and pigeonholes. This is the Fintype version of Finset.exists_ne_map_eq_of_card_lt_of_maps_to.

theorem Fintype.exists_ne_map_eq_of_card_lt.{u_1, u_2} {α : Type u_1} {β : Type u_2} [Fintype α] [Fintype β]
  (f : α  β) (h : Fintype.card β < Fintype.card α) :  x y, x  y  f x = f y

Data.Int.Cast.Basic

theorem Int.cast_natCast.{u} {R : Type u} [AddGroupWithOne R] (n : ) : ↑↑n = n

Data.Nat.Cast.Defs

theorem Nat.cast_add.{u_1} {R : Type u_1} [AddMonoidWithOne R] (m n : ) : (m + n) = m + n

Used by: Discrete.prod

theorem Nat.cast_one.{u_1} {R : Type u_1} [AddMonoidWithOne R] : 1 = 1

Data.Nat.Init

Induction principle starting at a non-zero number. To use in an induction proof, the syntax is induction n, hn using Nat.le_induction (or the same for induction').

This is an alias of Nat.leRec, specialized to Prop.

theorem Nat.le_induction {m : } {P : (n : )  m  n  Prop} (base : P m )
  (succ :  (n : ) (hmn : m  n), P n hmn  P (n + 1) ) (n : ) (hmn : m  n) : P n hmn

Data.Prod.Basic

theorem Prod.mk.eta.{u_1, u_2} {α : Type u_1} {β : Type u_2} {p : α × β} : (p.1, p.2) = p

Data.Quot

Map a function f : α → β that sends equivalent elements to equivalent elements to a function Quotient sa → Quotient sb. Useful to define unary operations on quotients.

def Quotient.map.{u_1, u_2} {α : Sort u_1} {β : Sort u_2} {sa : Setoid α} {sb : Setoid β} (f : α  β)
  (h :  a b : α⦄, a  b  f a  f b) : Quotient sa  Quotient sb

Map a function f : α → β → γ that sends equivalent elements to equivalent elements to a function f : Quotient sa → Quotient sb → Quotient sc. Useful to define binary operations on quotients.

def Quotient.map₂.{u_1, u_2, u_4} {α : Sort u_1} {β : Sort u_2} {sa : Setoid α} {sb : Setoid β}
  {γ : Sort u_4} {sc : Setoid γ} (f : α  β  γ)
  (h :  a a : α⦄, a  a   b b : β⦄, b  b  f a b  f a b) :
  Quotient sa  Quotient sb  Quotient sc

Data.Rat.Cast.Defs

theorem Rat.cast_intCast.{u_3} {α : Type u_3} [DivisionRing α] (n : ) : ↑↑n = n
theorem Rat.cast_natCast.{u_3} {α : Type u_3} [DivisionRing α] (n : ) : ↑↑n = n

Data.Rat.Defs

theorem Rat.pos (a : ) : 0 < a.den

Data.Real.Basic

The type of real numbers constructed as equivalence classes of Cauchy sequences of rational numbers.

structure Real : Type

Used by: Channel.capacity, Channel.loss, Channel.lossless, Channel.lossy_loses_overall, Channel.overall_loss, Component.Func.Conserves, Component.Func.toImpl, Component.Impl.Simplex.toInformationSystem, Component.Impl.empty, Component.Impl.id, Component.Impl.parallel, Component.Impl.parallel_comm, Component.Impl.recast, Component.Impl.sequential, Component.Impl.symmetry, Discrete, Discrete.pi, Discrete.prod, Discrete.size, Discrete.size_eq, InformationSystem, InformationSystem.Environment.universe, InformationSystem.Environment.universe_isolated, InformationSystem.Spontaneous, InformationSystem.Step.bottom, InformationSystem.Step.delta, InformationSystem.Step.delta_alt, InformationSystem.Step.delta_trichotomy, InformationSystem.Step.gains, InformationSystem.Step.loses, InformationSystem.delta, InformationSystem.eval_delta, InformationSystem.eval_trichotomy, InformationSystem.gatedFlow, InformationSystem.gatedFlow_success_AB, InformationSystem.gatedFlow_success_BA, InformationSystem.isolated, InformationSystem.natural, InformationSystem.not_spontaneous_and_perpetuous, InformationSystem.parallel_delta, InformationSystem.perpetuous, InformationSystem.perpetuous_coherent, InformationSystem.roundtrip_neutral, InformationSystem.sequential_delta, InformationSystem.spontaneous_no_self_return, InformationSystem.spontaneous_not_perpetuous, InformationSystem.toSimplex, InformationSystem.zero_run_le, NormNonneg, Receiver.step, Sender.step, discrete_Bit, discrete_Bool, discrete_Unit, eraseSecondBit, instNormBit, instNormBool_computerNetworks, instNormCell, instNormEnvelope, instNormForallFin_computerNetworks, instNormNonnegBit, instNormNonnegBool, instNormNonnegCell, instNormNonnegForallFin, instNormNonnegProd, instNormNonnegUnit, instNormProd_computerNetworks, instNormUnit_computerNetworks, instNormValue, irrational_logb_two_three, maxWireSize, totalSize, traffic_light_information

Data.Set.Defs

A set is a collection of elements of some type α.

Although Set is defined as α → Prop, this is an implementation detail which should not be relied on. Instead, setOf and membership of a set () should be used to convert between sets and predicates.

def Set.{u} (α : Type u) : Type u

Data.Set.Operations

Range of a function.

This function is more flexible than f '' univ, as the image requires that the domain is in Type and not an arbitrary Sort.

def Set.range.{u, u_1} {α : Type u} {ι : Sort u_1} (f : ι  α) : Set α

Logic.Function.Basic

The inverse of a function (which is a left inverse if f is injective and a right inverse if f is surjective).

def Function.invFun.{u, u_3} {α : Sort u} {β : Sort u_3} [Nonempty α] (f : α  β) : β  α
theorem Function.leftInverse_invFun.{u_1, u_2} {α : Sort u_1} {β : Sort u_2} [Nonempty α] {f : α  β}
  (hf : Function.Injective f) : Function.LeftInverse (Function.invFun f) f

Logic.Function.Iterate

theorem Function.iterate_succ_apply'.{u} {α : Type u} (f : α  α) (n : ) (x : α) :
  f^[n.succ] x = f (f^[n] x)

Iterate a function.

def Nat.iterate.{u} {α : Sort u} (op : α  α) :   α  α

Logic.Nonempty

Using Classical.choice, extracts a term from a Nonempty type.

abbrev Classical.arbitrary.{u_3} (α : Sort u_3) [h : Nonempty α] : α

NumberTheory.Real.Irrational

A real number is irrational if it is not equal to any rational number.

def Irrational (x : ) : Prop

Order.Defs.LinearOrder

theorem le_of_not_gt.{u_1} {α : Type u_1} [LinearOrder α] {a b : α} (h : ¬b < a) : a  b
theorem lt_of_not_ge.{u_1} {α : Type u_1} [LinearOrder α] {a b : α} (h : ¬b  a) : a < b
theorem lt_or_gt_of_ne.{u_1} {α : Type u_1} [LinearOrder α] {a b : α} (h : a  b) : a < b  b < a
theorem lt_trichotomy.{u_1} {α : Type u_1} [LinearOrder α] (a b : α) : a < b  a = b  b < a

Order.Defs.PartialOrder

The relation on a preorder is reflexive.

theorem le_refl.{u_1} {α : Type u_1} [Preorder α] (a : α) : a  a

Tactic.Linarith.Lemmas

theorem Mathlib.Tactic.Linarith.add_lt_of_le_of_neg.{u} {α : Type u} [Semiring α] [PartialOrder α]
  [IsStrictOrderedRing α] {a b c : α} (hbc : b  c) (ha : a < 0) : b + a < c
theorem Mathlib.Tactic.Linarith.add_lt_of_neg_of_le.{u} {α : Type u} [Semiring α] [PartialOrder α]
  [IsStrictOrderedRing α] {a b c : α} (ha : a < 0) (hbc : b  c) : a + b < c
theorem Mathlib.Tactic.Linarith.add_nonpos.{u} {α : Type u} [Semiring α] [PartialOrder α] [IsOrderedRing α]
  {a b : α} (ha : a  0) (hb : b  0) : a + b  0
theorem Mathlib.Tactic.Linarith.le_of_eq_of_le.{u} {α : Type u} [Semiring α] [PartialOrder α] {a b : α}
  (ha : a = 0) (hb : b  0) : a + b  0
theorem Mathlib.Tactic.Linarith.sub_nonpos_of_le.{u} {α : Type u} [Ring α] [PartialOrder α]
  [IsOrderedRing α] {a b : α} : a  b  a - b  0

Tactic.NormNum.Basic

theorem Mathlib.Meta.NormNum.isInt_add.{u_1} {α : Type u_1} [Ring α] {f : α  α  α} {a b : α}
  {a' b' c : } :
  f = HAdd.hAdd 
    Mathlib.Meta.NormNum.IsInt a a' 
      Mathlib.Meta.NormNum.IsInt b b'  a'.add b' = c  Mathlib.Meta.NormNum.IsInt (f a b) c
theorem Mathlib.Meta.NormNum.isNat_eq_true.{u} {α : Type u} [AddMonoidWithOne α] {a b : α} {c : } :
  Mathlib.Meta.NormNum.IsNat a c  Mathlib.Meta.NormNum.IsNat b c  a = b
theorem Mathlib.Meta.NormNum.isNat_mul.{u_1} {α : Type u_1} [Semiring α] {f : α  α  α} {a b : α}
  {a' b' c : } :
  f = HMul.hMul 
    Mathlib.Meta.NormNum.IsNat a a' 
      Mathlib.Meta.NormNum.IsNat b b'  a'.mul b' = c  Mathlib.Meta.NormNum.IsNat (a * b) c
theorem Mathlib.Meta.NormNum.isNat_natCast.{u_1} {R : Type u_1} [AddMonoidWithOne R] (n m : ) :
  Mathlib.Meta.NormNum.IsNat n m  Mathlib.Meta.NormNum.IsNat (n) m

Tactic.NormNum.Eq

theorem Mathlib.Meta.NormNum.isNat_eq_false.{u_1} {α : Type u_1} [AddMonoidWithOne α] [CharZero α] {a b : α}
  {a' b' : } :
  Mathlib.Meta.NormNum.IsNat a a'  Mathlib.Meta.NormNum.IsNat b b'  a'.beq b' = false  ¬a = b

Tactic.NormNum.Ineq

theorem Mathlib.Meta.NormNum.isNat_le_false.{u_1} {α : Type u_1} [Semiring α] [PartialOrder α]
  [IsOrderedRing α] [CharZero α] {a b : α} {a' b' : } (ha : Mathlib.Meta.NormNum.IsNat a a')
  (hb : Mathlib.Meta.NormNum.IsNat b b') (h : a'.ble b' = false) : ¬a  b
theorem Mathlib.Meta.NormNum.isNat_le_true.{u_1} {α : Type u_1} [Semiring α] [PartialOrder α]
  [IsOrderedRing α] {a b : α} {a' b' : } :
  Mathlib.Meta.NormNum.IsNat a a'  Mathlib.Meta.NormNum.IsNat b b'  a'.ble b' = true  a  b
theorem Mathlib.Meta.NormNum.isNat_lt_true.{u_1} {α : Type u_1} [Semiring α] [PartialOrder α]
  [IsOrderedRing α] [CharZero α] {a b : α} {a' b' : } :
  Mathlib.Meta.NormNum.IsNat a a'  Mathlib.Meta.NormNum.IsNat b b'  b'.ble a' = false  a < b

Tactic.NormNum.Pow

theorem Mathlib.Meta.NormNum.IsNatPowT.bit0 {a b c : } :
  Mathlib.Meta.NormNum.IsNatPowT (a.pow b = c) a (2 * b) (c.mul c)
theorem Mathlib.Meta.NormNum.IsNatPowT.bit1 {a b c : } :
  Mathlib.Meta.NormNum.IsNatPowT (a.pow b = c) a (2 * b + 1) (c.mul (c.mul a))
theorem Mathlib.Meta.NormNum.IsNatPowT.run {a b c : }
  (p : Mathlib.Meta.NormNum.IsNatPowT (a.pow 1 = a) a b c) : a.pow b = c

This is the key to making the proof proceed as a balanced tree of applications instead of a linear sequence. It is just modus ponens after unwrapping the definitions.

theorem Mathlib.Meta.NormNum.IsNatPowT.trans {a b c : } {p : Prop} {b' c' : }
  (h1 : Mathlib.Meta.NormNum.IsNatPowT p a b c)
  (h2 : Mathlib.Meta.NormNum.IsNatPowT (a.pow b = c) a b' c') :
  Mathlib.Meta.NormNum.IsNatPowT p a b' c'
theorem Mathlib.Meta.NormNum.isNat_pow.{u_1} {α : Type u_1} [Semiring α] {f : α    α} {a : α}
  {b a' b' c : } :
  f = HPow.hPow 
    Mathlib.Meta.NormNum.IsNat a a' 
      Mathlib.Meta.NormNum.IsNat b b'  a'.pow b' = c  Mathlib.Meta.NormNum.IsNat (f a b) c

Tactic.NormNum.Result

A “raw int cast” is an expression of the form:

  • (Nat.rawCast lit : α) where lit is a raw natural number literal
  • (Int.rawCast (Int.negOfNat lit) : α) where lit is a nonzero raw natural number literal

(That is, we only actually use this function for negative integers.) This representation is used by tactics like ring to decrease the number of typeclass arguments required in each use of a number literal at type α.

def Int.rawCast.{u} {α : Type u} [Ring α] (n : ) : α

A shortcut (non)instance for Nat.AtLeastTwo (n + 2) to shrink generated proofs.

theorem Mathlib.Meta.NormNum.instAtLeastTwo (n : ) : (n + 2).AtLeastTwo

A “raw nat cast” is an expression of the form (Nat.rawCast lit : α) where lit is a raw natural number literal. These expressions are used by tactics like ring to decrease the number of typeclass arguments required in each use of a number literal at type α.

def Nat.rawCast.{u} {α : Type u} [AddMonoidWithOne α] (n : ) : α

Tactic.Push

theorem Mathlib.Tactic.Push.not_and_eq (p q : Prop) : (¬(p  q)) = (p  ¬q)

Tactic.Ring.Basic

Tactic.Ring.Common

theorem Mathlib.Tactic.Ring.Common.add_mul.{u_1} {R : Type u_1} [CommSemiring R] {a a b c c d : R} :
  a * b = c  a * b = c  c + c = d  (a + a) * b = d
theorem Mathlib.Tactic.Ring.Common.mul_add.{u_1} {R : Type u_1} [CommSemiring R] {a b b c c d : R} :
  a * b = c  a * b = c  c + 0 + c = d  a * (b + b) = d
theorem Mathlib.Tactic.Ring.Common.mul_congr.{u_1} {R : Type u_1} [CommSemiring R] {a a' b b' c : R} :
  a = a'  b = b'  a' * b' = c  a * b = c
theorem Mathlib.Tactic.Ring.Common.mul_pf_left.{u_1} {R : Type u_1} [CommSemiring R] {a b c : R} (a : R)
  (a : ) : a * b = c  a ^ a * a * b = a ^ a * c
theorem Mathlib.Tactic.Ring.Common.mul_pf_right.{u_1} {R : Type u_1} [CommSemiring R] {a b c : R} (b : R)
  (b : ) : a * b = c  a * (b ^ b * b) = b ^ b * c
theorem Mathlib.Tactic.Ring.Common.mul_zero.{u_1} {R : Type u_1} [CommSemiring R] (a : R) : a * 0 = 0
theorem Mathlib.Tactic.Ring.Common.zero_mul.{u_1} {R : Type u_1} [CommSemiring R] (b : R) : 0 * b = 0