simple-topes-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

RSTT.Tope

Synopsis

Documentation

data Tope Source #

A tope expression.

Constructors

TopeTop

Top tope: \(\top\).

TopeBottom

Bottom tope: \(\bot\).

TopeAnd Tope Tope

AND tope: \(\phi \land \psi\).

TopeOr Tope Tope

OR tope: \(\phi \lor \psi\).

TopeEQ Point Point

Point equality tope: \(t \equiv s\).

TopeVar Var

A tope variable.

TopeImplies Tope Tope

IMPLIES tope: \(\phi \Rightarrow \psi\). NOTE: this tope is added to internalise known tope judgements and simplify proof search.

TopeCon Label [Point]

User-defined tope constructor (fully applied to some points).

Instances

Instances details
IsString Tope Source # 
Instance details

Defined in RSTT.Tope

Methods

fromString :: String -> Tope #

Show Tope Source # 
Instance details

Defined in RSTT.Tope

Methods

showsPrec :: Int -> Tope -> ShowS #

show :: Tope -> String #

showList :: [Tope] -> ShowS #

Eq Tope Source # 
Instance details

Defined in RSTT.Tope

Methods

(==) :: Tope -> Tope -> Bool #

(/=) :: Tope -> Tope -> Bool #

Ord Tope Source # 
Instance details

Defined in RSTT.Tope

Methods

compare :: Tope -> Tope -> Ordering #

(<) :: Tope -> Tope -> Bool #

(<=) :: Tope -> Tope -> Bool #

(>) :: Tope -> Tope -> Bool #

(>=) :: Tope -> Tope -> Bool #

max :: Tope -> Tope -> Tope #

min :: Tope -> Tope -> Tope #

data Shape Source #

A shape is a tope in a cube context (with just one cube point variable): \(\{t : I \mid \phi \}\).

Constructors

Shape 

Fields

Instances

Instances details
Show Shape Source # 
Instance details

Defined in RSTT.Tope

Methods

showsPrec :: Int -> Shape -> ShowS #

show :: Shape -> String #

showList :: [Shape] -> ShowS #

Eq Shape Source # 
Instance details

Defined in RSTT.Tope

Methods

(==) :: Shape -> Shape -> Bool #

(/=) :: Shape -> Shape -> Bool #

type TopeContext = [Tope] Source #

A tope context consists of a set of topes.

Pretty-printing

ppShape :: Shape -> String Source #

Pretty-print a Shape.

ppTope :: Tope -> String Source #

Pretty-print a Tope.

ppTopePrec :: Int -> Tope -> String Source #

Pretty-print a Tope expression in a given precedence environment.

replacePointInTope :: Point -> Point -> Tope -> Tope Source #

Replace a point subterm everywhere in a tope term.

replacePoint :: Point -> Point -> Point -> Point Source #

Replace a point subterm everywhere in a point term.

subPointOf :: Point -> Point -> Bool Source #

Check whether a point term is a subterm of another point term.