Zulip Chat Archive
Stream: new members
Topic: Two noob questions
debord (Aug 17 2024 at 06:37):
Hello. Here's an MWE of the project I've gotten to start:
import Mathlib.CategoryTheory.Products.Basic
open CategoryTheory
namespace Quantum
universe vā vā uā uā
variable (š : Type uā) [Category.{vā} š]
class MonoidalCategoryData where
tensorProduct : š Ć š ℤ š
unitObject : š
associator : ā A B C : š, tensorProduct.obj ((tensorProduct.obj (A, B)), C) ā
tensorProduct.obj (A, (tensorProduct.obj (B, C)))
leftUnitor : ā A : š, tensorProduct.obj (unitObject, A) ā
A
rightUnitor : ā A : š, tensorProduct.obj (A, unitObject) ā
A
scoped notation:70 lhs:71 "ā" rhs:70 => MonoidalCategoryData.tensorProduct.obj (lhs, rhs)
scoped notation:70 lhs:71 "ā" rhs:70 => MonoidalCategoryData.tensorProduct.map (lhs, rhs)
scoped notation "š" => MonoidalCategoryData.unitObject
scoped notation "α" => MonoidalCategoryData.associator
scoped notation "γ" => MonoidalCategoryData.leftUnitor
scoped notation "Ļ" => MonoidalCategoryData.rightUnitor
class MonoidalCategory extends MonoidalCategoryData š where
triangle : ā A B : š, (α A š B).hom ā« ((š A) ā (γ B).hom) = ((Ļ A).hom ā (š B) : (A ā š) ā B ā¶ A ā B)
pentagon : ā A B C D : š, ((α A B C).hom ā (š D)) ā« (α A (B ā C) D).hom ā« ((š A) ā (α B C D).hom) = (α (A ā B) C D).hom ā« (α A B (C ā D)).hom
variable (ā³ : Type uā) [Category.{vā} ā³] [MonoidalCategory ā³]
def State (A : ā³) := š ā¶ A
class WellPointedMonoidalCategory extends MonoidalCategory ā³ where
wellpointed : ā A B : ā³, ā f g : A ā¶ B, ā a : State A, a ā« f = a ā« g ā f = g
Question 1: Why is State A on WellPointedMonoidalCategory giving a type mismatch error? Don't I define State as taking an input of type ā³ and I'm giving it an input of type ā³?
Question 2: I want to define a notion of monoidally well pointed monoidal category. This goes like: for all pairs of morphisms $f,g : A_1 \otimes \cdots \otimes A_n \to B$ and all states $a_1 : I \to A_1, \ldots, a_n : I \to A_n$ bla bla... How do I express having an arbitrary n amount of tensor products or n states like that in Lean?
Last updated: May 02 2025 at 03:31 UTC