PhysLean Documentation

PhysLean.Mathematics.Fin

Fin lemmas #

The purpose of this file is to define some results Fin currently in Mathlib.

At some point these should either be up-streamed to Mathlib or replaced with definitions already in Mathlib.

Given a i and x in Fin n.succ.succ returns an element of Fin n.succ subtracting 1 if i.val ≤ x.val else casting x.

Equations
Instances For
    theorem PhysLean.Fin.predAboveI_self {n : } (i : Fin n.succ.succ) :
    predAboveI i i = i - 1,
    @[simp]
    theorem PhysLean.Fin.predAboveI_succAbove {n : } (i : Fin n.succ.succ) (x : Fin n.succ) :
    theorem PhysLean.Fin.succsAbove_predAboveI {n : } {i x : Fin n.succ.succ} (h : i x) :
    theorem PhysLean.Fin.predAboveI_eq_iff {n : } {i x : Fin n.succ.succ} (h : i x) (y : Fin n.succ) :
    y = predAboveI i x i.succAbove y = x
    theorem PhysLean.Fin.predAboveI_lt {n : } {i x : Fin n.succ.succ} (h : x < i) :
    predAboveI i x = x,
    theorem PhysLean.Fin.predAboveI_ge {n : } {i x : Fin n.succ.succ} (h : i < x) :
    predAboveI i x = x - 1,

    The equivalence between Fin n.succ and Fin 1 ⊕ Fin n extracting the ith component.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Given an equivalence Fin n.succ.succ ≃ Fin n.succ.succ, and an i : Fin n.succ.succ, the map Fin n.succ → Fin n.succ obtained by dropping i and it's image.

      Equations
      Instances For

        Given an equivalence Fin n.succ.succ ≃ Fin n.succ.succ, and an i : Fin n.succ.succ, the equivalence Fin n.succ ≃ Fin n.succ obtained by dropping i and it's image.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem PhysLean.Fin.finExtractOnePerm_apply {n : } (i : Fin n.succ.succ) (σ : Fin n.succ.succ Fin n.succ.succ) (x : Fin n.succ) :
          (finExtractOnePerm i σ) x = predAboveI (σ i) (σ ((finExtractOne i).symm (Sum.inr x)))
          @[simp]
          theorem PhysLean.Fin.finExtractOnePerm_symm_apply {n : } (i : Fin n.succ.succ) (σ : Fin n.succ.succ Fin n.succ.succ) (x : Fin n.succ) :
          (finExtractOnePerm i σ).symm x = predAboveI (σ.symm (σ i)) (σ.symm ((finExtractOne (σ i)).symm (Sum.inr x)))
          def PhysLean.Fin.finExtractTwo {n : } (i : Fin n.succ.succ) (j : Fin n.succ) :

          The equivalence of types Fin n.succ.succ ≃ (Fin 1 ⊕ Fin 1) ⊕ Fin n extracting the i and (i.succAbove j).

          Equations
          Instances For
            @[simp]
            @[simp]
            def PhysLean.Fin.finMapToEquiv {n m : } (f1 : Fin nFin m) (f2 : Fin mFin n) (h : ∀ (x : Fin m), f1 (f2 x) = x := by decide) (h' : ∀ (x : Fin n), f2 (f1 x) = x := by decide) :
            Fin n Fin m

            Takes two maps Fin n → Fin n and returns the equivalence they form.

            Equations
            Instances For
              @[simp]
              theorem PhysLean.Fin.finMapToEquiv_apply {n m : } {f1 : Fin nFin m} {f2 : Fin mFin n} {h : ∀ (x : Fin m), f1 (f2 x) = x} {h' : ∀ (x : Fin n), f2 (f1 x) = x} (x : Fin n) :
              (finMapToEquiv f1 f2 h h') x = f1 x
              @[simp]
              theorem PhysLean.Fin.finMapToEquiv_symm_apply {n m : } {f1 : Fin nFin m} {f2 : Fin mFin n} {h : ∀ (x : Fin m), f1 (f2 x) = x} {h' : ∀ (x : Fin n), f2 (f1 x) = x} (x : Fin m) :
              (finMapToEquiv f1 f2 h h').symm x = f2 x
              theorem PhysLean.Fin.finMapToEquiv_symm_eq {n m : } {f1 : Fin nFin m} {f2 : Fin mFin n} {h : ∀ (x : Fin m), f1 (f2 x) = x} {h' : ∀ (x : Fin n), f2 (f1 x) = x} :
              (finMapToEquiv f1 f2 h h').symm = finMapToEquiv f2 f1 h' h
              def PhysLean.Fin.equivCons {n m : } (e : Fin n Fin m) :

              Given an equivalence between Fin n and Fin m, the induced equivalence between Fin n.succ and Fin m.succ derived by Fin.cons.

              Equations
              Instances For
                @[simp]
                theorem PhysLean.Fin.equivCons_zero {n m : } (e : Fin n Fin m) :
                (equivCons e) 0 = 0
                @[simp]
                theorem PhysLean.Fin.equivCons_trans {n m k : } (e : Fin n Fin m) (f : Fin m Fin k) :
                @[simp]
                theorem PhysLean.Fin.equivCons_symm_succ {n m : } (e : Fin n Fin m) (i : ) (hi : i + 1 < m.succ) :
                (equivCons e).symm i + 1, hi = (e.symm i, ).succ
                @[simp]
                theorem PhysLean.Fin.equivCons_succ {n m : } (e : Fin n Fin m) (i : ) (hi : i + 1 < n.succ) :
                (equivCons e) i + 1, hi = (e i, ).succ