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