Instances and theorems on pi types #
This file provides basic definitions and notation instances for Pi types.
Instances of more sophisticated classes are defined in pi.lean
files elsewhere.
1
, 0
, +
, *
, -
, ⁻¹
, and /
are defined pointwise.
@[protected, instance]
def
pi.has_zero
{I : Type u}
{f : I → Type v₁}
[Π (i : I), has_zero (f i)] :
has_zero (Π (i : I), f i)
Equations
- pi.has_zero = {zero := λ (_x : I), 0}
@[protected, instance]
Equations
- pi.has_one = {one := λ (_x : I), 1}
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem
pi.comp_zero
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_zero β]
(x : β → γ) :
x ∘ 0 = function.const α (x 0)
@[simp]
theorem
pi.comp_one
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_one β]
(x : β → γ) :
x ∘ 1 = function.const α (x 1)
@[protected, instance]
Equations
- pi.has_mul = {mul := λ (f_1 g : Π (i : I), f i) (i : I), (f_1 i) * g i}
@[protected, instance]
Equations
- pi.has_add = {add := λ (f_1 g : Π (i : I), f i) (i : I), f_1 i + g i}
@[simp]
theorem
pi.const_add
{α : Type u_1}
{β : Type u_2}
[has_add β]
(a b : β) :
function.const α a + function.const α b = function.const α (a + b)
@[simp]
theorem
pi.const_mul
{α : Type u_1}
{β : Type u_2}
[has_mul β]
(a b : β) :
(function.const α a) * function.const α b = function.const α (a * b)
@[protected, instance]
Equations
- pi.has_inv = {inv := λ (f_1 : Π (i : I), f i) (i : I), (f_1 i)⁻¹}
@[protected, instance]
Equations
- pi.has_neg = {neg := λ (f_1 : Π (i : I), f i) (i : I), -f_1 i}
theorem
pi.const_inv
{α : Type u_1}
{β : Type u_2}
[has_inv β]
(a : β) :
(function.const α a)⁻¹ = function.const α a⁻¹
theorem
pi.const_neg
{α : Type u_1}
{β : Type u_2}
[has_neg β]
(a : β) :
-function.const α a = function.const α (-a)
@[protected, instance]
Equations
- pi.has_sub = {sub := λ (f_1 g : Π (i : I), f i) (i : I), f_1 i - g i}
@[protected, instance]
Equations
- pi.has_div = {div := λ (f_1 g : Π (i : I), f i) (i : I), f_1 i / g i}
@[simp]
theorem
pi.const_sub
{α : Type u_1}
{β : Type u_2}
[has_sub β]
(a b : β) :
function.const α a - function.const α b = function.const α (a - b)
@[simp]
theorem
pi.const_div
{α : Type u_1}
{β : Type u_2}
[has_div β]
(a b : β) :
function.const α a / function.const α b = function.const α (a / b)
def
pi.single
{I : Type u}
{f : I → Type v₁}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
(i : I)
(x : f i)
(i_1 : I) :
f i_1
The function supported at i
, with value x
there.
Equations
- pi.single i x = function.update 0 i x
@[simp]
theorem
pi.single_eq_same
{I : Type u}
{f : I → Type v₁}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
(i : I)
(x : f i) :
@[simp]
theorem
pi.single_eq_of_ne
{I : Type u}
{f : I → Type v₁}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
{i i' : I}
(h : i' ≠ i)
(x : f i) :
@[simp]
theorem
pi.single_eq_of_ne'
{I : Type u}
{f : I → Type v₁}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
{i i' : I}
(h : i ≠ i')
(x : f i) :
Abbreviation for single_eq_of_ne h.symm
, for ease of use by simp
.
@[simp]
theorem
pi.single_zero
{I : Type u}
{f : I → Type v₁}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
(i : I) :
theorem
pi.single_apply
{I : Type u}
[decidable_eq I]
{β : Type u_1}
[has_zero β]
(i : I)
(x : β)
(i' : I) :
On non-dependent functions, pi.single
can be expressed as an ite
theorem
pi.single_comm
{I : Type u}
[decidable_eq I]
{β : Type u_1}
[has_zero β]
(i : I)
(x : β)
(i' : I) :
On non-dependent functions, pi.single
is symmetric in the two indices.
theorem
pi.apply_single
{I : Type u}
{f : I → Type v₁}
{g : I → Type v₂}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
[Π (i : I), has_zero (g i)]
(f' : Π (i : I), f i → g i)
(hf' : ∀ (i : I), f' i 0 = 0)
(i : I)
(x : f i)
(j : I) :
theorem
pi.apply_single₂
{I : Type u}
{f : I → Type v₁}
{g : I → Type v₂}
{h : I → Type v₃}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
[Π (i : I), has_zero (g i)]
[Π (i : I), has_zero (h i)]
(f' : Π (i : I), f i → g i → h i)
(hf' : ∀ (i : I), f' i 0 0 = 0)
(i : I)
(x : f i)
(y : g i)
(j : I) :
theorem
pi.single_op
{I : Type u}
{f : I → Type v₁}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
{g : I → Type u_1}
[Π (i : I), has_zero (g i)]
(op : Π (i : I), f i → g i)
(h : ∀ (i : I), op i 0 = 0)
(i : I)
(x : f i) :
theorem
pi.single_op₂
{I : Type u}
{f : I → Type v₁}
[decidable_eq I]
[Π (i : I), has_zero (f i)]
{g₁ : I → Type u_1}
{g₂ : I → Type u_2}
[Π (i : I), has_zero (g₁ i)]
[Π (i : I), has_zero (g₂ i)]
(op : Π (i : I), g₁ i → g₂ i → f i)
(h : ∀ (i : I), op i 0 0 = 0)
(i : I)
(x₁ : g₁ i)
(x₂ : g₂ i) :
theorem
pi.single_injective
{I : Type u}
(f : I → Type v₁)
[decidable_eq I]
[Π (i : I), has_zero (f i)]
(i : I) :
@[simp]
theorem
pi.single_inj
{I : Type u}
(f : I → Type v₁)
[decidable_eq I]
[Π (i : I), has_zero (f i)]
(i : I)
{x y : f i} :
theorem
function.extend_one
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_one γ]
(f : α → β) :
function.extend f 1 1 = 1
theorem
function.extend_zero
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_zero γ]
(f : α → β) :
function.extend f 0 0 = 0
theorem
function.extend_add
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_add γ]
(f : α → β)
(g₁ g₂ : α → γ)
(e₁ e₂ : β → γ) :
function.extend f (g₁ + g₂) (e₁ + e₂) = function.extend f g₁ e₁ + function.extend f g₂ e₂
theorem
function.extend_mul
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_mul γ]
(f : α → β)
(g₁ g₂ : α → γ)
(e₁ e₂ : β → γ) :
function.extend f (g₁ * g₂) (e₁ * e₂) = (function.extend f g₁ e₁) * function.extend f g₂ e₂
theorem
function.extend_neg
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_neg γ]
(f : α → β)
(g : α → γ)
(e : β → γ) :
function.extend f (-g) (-e) = -function.extend f g e
theorem
function.extend_inv
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_inv γ]
(f : α → β)
(g : α → γ)
(e : β → γ) :
function.extend f g⁻¹ e⁻¹ = (function.extend f g e)⁻¹
theorem
function.extend_div
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_div γ]
(f : α → β)
(g₁ g₂ : α → γ)
(e₁ e₂ : β → γ) :
function.extend f (g₁ / g₂) (e₁ / e₂) = function.extend f g₁ e₁ / function.extend f g₂ e₂
theorem
function.extend_sub
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[has_sub γ]
(f : α → β)
(g₁ g₂ : α → γ)
(e₁ e₂ : β → γ) :
function.extend f (g₁ - g₂) (e₁ - e₂) = function.extend f g₁ e₁ - function.extend f g₂ e₂
theorem
function.surjective_pi_map
{I : Type u}
{f : I → Type v₁}
{g : I → Type v₂}
{F : Π (i : I), f i → g i}
(hF : ∀ (i : I), function.surjective (F i)) :
function.surjective (λ (x : Π (i : I), f i) (i : I), F i (x i))
theorem
function.injective_pi_map
{I : Type u}
{f : I → Type v₁}
{g : I → Type v₂}
{F : Π (i : I), f i → g i}
(hF : ∀ (i : I), function.injective (F i)) :
function.injective (λ (x : Π (i : I), f i) (i : I), F i (x i))
theorem
function.bijective_pi_map
{I : Type u}
{f : I → Type v₁}
{g : I → Type v₂}
{F : Π (i : I), f i → g i}
(hF : ∀ (i : I), function.bijective (F i)) :
function.bijective (λ (x : Π (i : I), f i) (i : I), F i (x i))
theorem
subsingleton.pi_single_eq
{I : Type u}
{α : Type u_1}
[decidable_eq I]
[subsingleton I]
[has_zero α]
(i : I)
(x : α) :