The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V02. Numbers

Mathlib.Data.Fin.Tuple.Embedding

17 declarations. Mathlib docs · Source

Constructions of embeddings of Fin n into a type

  • Fin.Embedding.cons : from an embedding x : Fin n ↪ α and a : α such that a ∉ x.range, construct an embedding Fin (n + 1) ↪ α by putting a at 0

  • Fin.Embedding.tail: the tail of an embedding x : Fin (n + 1) ↪ α

  • Fin.Embedding.snoc : from an embedding x : Fin n ↪ α and a : α such that a ∉ x.range, construct an embedding Fin (n + 1) ↪ α by putting a at the end.

  • Fin.Embedding.init: the init of an embedding x : Fin (n + 1) ↪ α

  • Fin.Embedding.append : merges two embeddings Fin m ↪ α and Fin n ↪ α into an embedding Fin (m + n) ↪ α if they have disjoint ranges

def Fin.Embedding.tail E1 #

{α : Type u_1} → {n : ℕ} → (Fin (n + 1) ↪ α) → Fin n ↪ α

Remove the first element from an injective (n + 1)-tuple.

theorem Fin.Embedding.coe_tail E0 #

∀ {α : Type u_1} {n : ℕ} (x : Fin (n + 1) ↪ α), ⇑(Fin.Embedding.tail x) = Fin.tail ⇑x

def Fin.Embedding.cons E1 #

{α : Type u_1} → {n : ℕ} → (x : Fin n ↪ α) → {a : α} → a ∉ Set.range ⇑x → Fin (n + 1) ↪ α

Adding a new element at the beginning of an injective n-tuple, to get an injective n+1-tuple.

theorem Fin.Embedding.coe_cons E0 #

∀ {α : Type u_1} {n : ℕ} (x : Fin n ↪ α) {a : α} (ha : a ∉ Set.range ⇑x), ⇑(Fin.Embedding.cons x ha) = Fin.cons a ⇑x

theorem Fin.Embedding.tail_cons E1 #

∀ {α : Type u_1} {n : ℕ} (x : Fin n ↪ α) {a : α} (ha : a ∉ Set.range ⇑x),
  Fin.Embedding.tail (Fin.Embedding.cons x ha) = x

def Fin.Embedding.init E1 #

{α : Type u_1} → {n : ℕ} → (Fin (n + 1) ↪ α) → Fin n ↪ α

Remove the last element from an injective (n + 1)-tuple.

def Fin.Embedding.snoc E1 #

{α : Type u_1} → {n : ℕ} → (x : Fin n ↪ α) → {a : α} → a ∉ Set.range ⇑x → Fin (n + 1) ↪ α

Adding a new element at the end of an injective n-tuple, to get an injective n+1-tuple.

theorem Fin.Embedding.coe_snoc E0 #

∀ {α : Type u_1} {n : ℕ} (x : Fin n ↪ α) {a : α} (ha : a ∉ Set.range ⇑x), ⇑(Fin.Embedding.snoc x ha) = Fin.snoc (⇑x) a

theorem Fin.Embedding.init_snoc E1 #

∀ {α : Type u_1} {n : ℕ} (x : Fin n ↪ α) {a : α} (ha : a ∉ Set.range ⇑x),
  Fin.Embedding.init (Fin.Embedding.snoc x ha) = x

theorem Fin.Embedding.snoc_castSucc E1 #

∀ {α : Type u_1} {n : ℕ} {x : Fin n ↪ α} {a : α} {ha : a ∉ Set.range ⇑x} {i : Fin n},
  (Fin.Embedding.snoc x ha) i.castSucc = x i

theorem Fin.Embedding.snoc_last E1 #

∀ {α : Type u_1} {n : ℕ} {x : Fin n ↪ α} {a : α} {ha : a ∉ Set.range ⇑x}, (Fin.Embedding.snoc x ha) (Fin.last n) = a

def Fin.Embedding.append E1 #

{α : Type u_1} →
  {m n : ℕ} → {x : Fin m ↪ α} → {y : Fin n ↪ α} → Disjoint (Set.range ⇑x) (Set.range ⇑y) → Fin (m + n) ↪ α

Append a Fin n ↪ α at the end of a Fin m ↪ α if their ranges are disjoint.

theorem Fin.Embedding.coe_append E0 #

∀ {α : Type u_1} {m n : ℕ} {x : Fin m ↪ α} {y : Fin n ↪ α} (h : Disjoint (Set.range ⇑x) (Set.range ⇑y)),
  ⇑(Fin.Embedding.append h) = Fin.append ⇑x ⇑y

def Function.Embedding.twoEmbeddingEquiv E1 #

{α : Type u_1} → (Fin 2 ↪ α) ≃ ↑{(a, b) | a ≠ b}

The natural equivalence of Fin 2 ↪ α with pairs (a, b) of distinct elements of α.

def Function.Embedding.embFinTwo E1 #

{α : Type u_1} → {a b : α} → a ≠ b → Fin 2 ↪ α

Two distinct elements of α give an embedding Fin 2 ↪ α.

theorem Function.Embedding.embFinTwo_apply_zero E1 #

∀ {α : Type u_1} {a b : α} (h : a ≠ b), (Function.Embedding.embFinTwo h) 0 = a

theorem Function.Embedding.embFinTwo_apply_one E1 #

∀ {α : Type u_1} {a b : α} (h : a ≠ b), (Function.Embedding.embFinTwo h) 1 = b