rzk-0.11.4: An experimental proof assistant for synthetic ∞-categories
Safe HaskellNone
LanguageHaskell2010

Rzk.Check.Modality

Description

The mode theory of the modalities: composition, and the coercions between them (what a lock lets through). The rules are those of Gratzer, Weinberger, and Buchholtz, /Directed Univalence in Simplicial Homotopy Type Theory/ (2024), §3.1.1. The tables match the old checker (Rzk.TypeCheck.Context).

The coercion Flat ⇒ Op is not a generating rule. It follows in the generated 2-category by whiskering Flat ⇒ Id on the right by Op: Flat ∘ Op ⇒ Id ∘ Op simplifies to Flat ⇒ Op.

Synopsis

Documentation

data TModality Source #

Constructors

Sharp 
Flat 
Op 
Id 

Instances

Instances details
Show TModality Source # 
Instance details

Defined in Language.Rzk.Foil.Names

Eq TModality Source # 
Instance details

Defined in Language.Rzk.Foil.Names

Ord TModality Source # 
Instance details

Defined in Language.Rzk.Foil.Names

ModeTheory TModality Source # 
Instance details

Defined in Rzk.TypeCheck.Context

ZipMatchK TModality Source #

Matching the non-recursive fields of the signature.

A modality and a hole's name are part of the term: they must agree. A Binder is not: it records the names a binder introduces, purely so that goals and error messages can show the user's own names, and two terms that differ only in them are the same term. The old representation compared them (its Eq was derived), so x -> x and y -> y compared unequal; on the new one they are α-equivalent, as they should be.

Instance details

Defined in Language.Rzk.Foil.Syntax

Methods

zipMatchWithK :: forall (as :: LoT Type) (bs :: LoT Type) (cs :: LoT Type). Mappings as bs cs -> (TModality :@@: as) -> (TModality :@@: bs) -> Maybe (TModality :@@: cs) #

ZipMatchK TModality Source # 
Instance details

Defined in Rzk.Check.Syntax

Methods

zipMatchWithK :: forall (as :: LoT Type) (bs :: LoT Type) (cs :: LoT Type). Mappings as bs cs -> (TModality :@@: as) -> (TModality :@@: bs) -> Maybe (TModality :@@: cs) #

comp :: TModality -> TModality -> TModality Source #

Composition of modalities.

coe :: TModality -> TModality -> Bool Source #

Is there a 2-cell from the first modality to the second: may a variable or a tope at the first be used under a lock of the second?