File: Mathlib/Data/QPF/Multivariate/Basic.lean

full_name: MvQPF.abs_repr
code: /-- Multivariate quotients of polynomial functors.
-/
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) extends MvFunctor F where
  P : MvPFunctor.{u} n
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α ⟹ β) (p : P α), abs (f <$$> p) = f <$$> abs p
goal: MvQPF.abs (MvQPF.repr x) = x

full_name: MvQPF.repr
code: /-- Multivariate quotients of polynomial functors.
-/
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) extends MvFunctor F where
  P : MvPFunctor.{u} n
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α ⟹ β) (p : P α), abs (f <$$> p) = f <$$> abs p
goal: F α → ↑(MvQPF.P F) α

full_name: MvQPF.abs
code: /-- Multivariate quotients of polynomial functors.
-/
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) extends MvFunctor F where
  P : MvPFunctor.{u} n
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α ⟹ β) (p : P α), abs (f <$$> p) = f <$$> abs p
goal: ↑(MvQPF.P F) α → F α

full_name: MvQPF.abs_map
code: /-- Multivariate quotients of polynomial functors.
-/
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) extends MvFunctor F where
  P : MvPFunctor.{u} n
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α ⟹ β) (p : P α), abs (f <$$> p) = f <$$> abs p
goal: MvQPF.abs (f <$$> p) = f <$$> MvQPF.abs p

full_name: MvQPF.P
code: /-- Multivariate quotients of polynomial functors.
-/
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) extends MvFunctor F where
  P : MvPFunctor.{u} n
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α ⟹ β) (p : P α), abs (f <$$> p) = f <$$> abs p
goal: MvPFunctor.{u} n

full_name: MvQPF
code: /-- Multivariate quotients of polynomial functors.
-/
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) extends MvFunctor F where
  P : MvPFunctor.{u} n
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α ⟹ β) (p : P α), abs (f <$$> p) = f <$$> abs p
goal: Type (max (u + 1) u_1)

full_name: MvQPF.id_map
code: protected theorem id_map {α : TypeVec n} (x : F α) : TypeVec.id <$$> x = x 
goal: TypeVec.id <$$> x = x

full_name: MvQPF.comp_map
code: @[simp]
theorem comp_map {α β γ : TypeVec n} (f : α ⟹ β) (g : β ⟹ γ) (x : F α) :
    (g ⊚ f) <$$> x = g <$$> f <$$> x 
goal: (g ⊚ f) <$$> x = g <$$> f <$$> x

full_name: MvQPF.lawfulMvFunctor
code: instance (priority := 100) lawfulMvFunctor : LawfulMvFunctor F 
goal: LawfulMvFunctor F

full_name: MvQPF.liftP_iff
code: theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j) 
goal: MvFunctor.LiftP p x ↔ ∃ a f, x = MvQPF.abs ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : (MvQPF.P F).B a i), p (f i j)

full_name: MvQPF.liftR_iff
code: theorem liftR_iff {α : TypeVec n} (r : ∀ /- ⦃i⦄ -/ {i}, α i → α i → Prop) (x y : F α) :
    LiftR r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j) 
goal: MvFunctor.LiftR (fun {i} => r) x y ↔
  ∃ a f₀ f₁, x = MvQPF.abs ⟨a, f₀⟩ ∧ y = MvQPF.abs ⟨a, f₁⟩ ∧ ∀ (i : Fin2 n) (j : (MvQPF.P F).B a i), r (f₀ i j) (f₁ i j)

full_name: MvQPF.mem_supp
code: theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ 
goal: u ∈ MvFunctor.supp x i ↔ ∀ (a : (MvQPF.P F).A) (f : (MvQPF.P F).B a ⟹ α), MvQPF.abs ⟨a, f⟩ = x → u ∈ f i '' Set.univ

full_name: MvQPF.supp_eq
code: theorem supp_eq {α : TypeVec n} {i} (x : F α) :
    supp x i = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ } 
goal: MvFunctor.supp x i = {u | ∀ (a : (MvQPF.P F).A) (f : (MvQPF.P F).B a ⟹ α), MvQPF.abs ⟨a, f⟩ = x → u ∈ f i '' Set.univ}

full_name: MvQPF.has_good_supp_iff
code: theorem has_good_supp_iff {α : TypeVec n} (x : F α) :
    (∀ p, LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ i a' f', abs ⟨a', f'⟩ = x → f i '' univ ⊆ f' i '' univ 
goal: (∀ (p : (i : Fin2 n) → α i → Prop), MvFunctor.LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ MvFunctor.supp x i, p i u) ↔
  ∃ a f,
    MvQPF.abs ⟨a, f⟩ = x ∧
      ∀ (i : Fin2 n) (a' : (MvQPF.P F).A) (f' : (MvQPF.P F).B a' ⟹ α),
        MvQPF.abs ⟨a', f'⟩ = x → f i '' Set.univ ⊆ f' i '' Set.univ

full_name: MvQPF.IsUniform
code: /-- A qpf is said to be uniform if every polynomial functor
representing a single value all have the same range. -/
def IsUniform : Prop 
goal: Prop

full_name: MvQPF.LiftPPreservation
code: /-- does `abs` preserve `liftp`? -/
def LiftPPreservation : Prop 
goal: Prop

full_name: MvQPF.SuppPreservation
code: /-- does `abs` preserve `supp`? -/
def SuppPreservation : Prop 
goal: Prop

full_name: MvQPF.supp_eq_of_isUniform
code: theorem supp_eq_of_isUniform (h : q.IsUniform) {α : TypeVec n} (a : q.P.A) (f : q.P.B a ⟹ α) :
    ∀ i, supp (abs ⟨a, f⟩) i = f i '' univ 
goal: MvFunctor.supp (MvQPF.abs ⟨a, f⟩) i = f i '' Set.univ

full_name: MvQPF.liftP_iff_of_isUniform
code: theorem liftP_iff_of_isUniform (h : q.IsUniform) {α : TypeVec n} (x : F α) (p : ∀ i, α i → Prop) :
    LiftP p x ↔ ∀ (i), ∀ u ∈ supp x i, p i u 
goal: MvFunctor.LiftP p x ↔ ∀ (i : Fin2 n), ∀ u ∈ MvFunctor.supp x i, p i u

full_name: MvQPF.supp_map
code: theorem supp_map (h : q.IsUniform) {α β : TypeVec n} (g : α ⟹ β) (x : F α) (i) :
    supp (g <$$> x) i = g i '' supp x i 
goal: MvFunctor.supp (g <$$> x) i = g i '' MvFunctor.supp x i

full_name: MvQPF.suppPreservation_iff_isUniform
code: theorem suppPreservation_iff_isUniform : q.SuppPreservation ↔ q.IsUniform 
goal: MvQPF.SuppPreservation ↔ MvQPF.IsUniform

full_name: MvQPF.suppPreservation_iff_liftpPreservation
code: theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftPPreservation 
goal: MvQPF.SuppPreservation ↔ MvQPF.LiftPPreservation

full_name: MvQPF.liftpPreservation_iff_uniform
code: theorem liftpPreservation_iff_uniform : q.LiftPPreservation ↔ q.IsUniform 
goal: MvQPF.LiftPPreservation ↔ MvQPF.IsUniform

full_name: MvQPF.ofEquiv
code: /-- Any type function `F` that is (extensionally) equivalent to a QPF, is itself a QPF,
assuming that the functorial map of `F` behaves similar to `MvFunctor.ofEquiv eqv` -/
def ofEquiv {F F' : TypeVec.{u} n → Type*} [q : MvQPF F'] [MvFunctor F]
    (eqv : ∀ α, F α ≃ F' α)
    (map_eq : ∀ (α β : TypeVec n) (f : α ⟹ β) (a : F α),
      f <$$> a = ((eqv _).symm <| f <$$> eqv _ a) := by intros; rfl) :
    MvQPF F 
goal: MvQPF F

full_name: MvPFunctor.instMvQPFObj
code: /-- Every polynomial functor is a (trivial) QPF -/
instance MvPFunctor.instMvQPFObj {n} (P : MvPFunctor n) : MvQPF P 
goal: MvQPF ↑P