Finch
Copyright(c) Leon Vatthauer 2026
LicenseGPL-3
MaintainerLeon Vatthauer <leon.vatthauer@fau.de>
Stabilityexperimental
Portabilitynon-portable (ghc-wasm-meta)
Safe HaskellNone
LanguageGHC2024

Specification.Types

Description

This module defines specification types that mirror Term, Formula, tAssumption and Proof for describing Fitch proof rules.

Synopsis

Rule specifications

type ProofSpec = ([AssumptionSpec], FormulaSpec) Source #

Specification of a referenced Proof premise, containing the specification of its Assumptions and its conclusion.

data RuleSpec Source #

The specification of a Fitch rule.

Constructors

RuleSpec

A RuleSpec consists of a list of FormulaSpec premises, a list of ProofSpec premises, and a conclusion.

Fields

Instances

Instances details
Show RuleSpec Source # 
Instance details

Defined in Specification.Types

Eq RuleSpec Source # 
Instance details

Defined in Specification.Types

ruleSpecTex :: RuleSpec -> Text Source #

Renders a RuleSpec as TeX for displaying via MathJAX.

Term and Formula specifications

data Subst a Source #

A substitution of a named placeholder by some value.

Constructors

Subst Name a

Subst name value replaces the placeholder name with value.

Instances

Instances details
PrettyPrint a => PrettyPrint (Subst a) Source # 
Instance details

Defined in Specification.Types

Methods

prettyPrint :: Subst a -> Text Source #

Show a => Show (Subst a) Source # 
Instance details

Defined in Specification.Types

Methods

showsPrec :: Int -> Subst a -> ShowS #

show :: Subst a -> String #

showList :: [Subst a] -> ShowS #

Eq a => Eq (Subst a) Source # 
Instance details

Defined in Specification.Types

Methods

(==) :: Subst a -> Subst a -> Bool #

(/=) :: Subst a -> Subst a -> Bool #

(~>) :: Name -> a -> Subst a infixl 9 Source #

Smart constructor for Subst.

data TermSpec Source #

A Term specification used in RuleSpec specifications.

Constructors

TVar Name

A term variable.

TFun Name [TermSpec]

A function application.

TPlaceholder Name

A placeholder for Terms T.

Instances

Instances details
PrettyPrint TermSpec Source # 
Instance details

Defined in Specification.Types

Show TermSpec Source # 
Instance details

Defined in Specification.Types

Eq TermSpec Source # 
Instance details

Defined in Specification.Types

data FormulaSpec Source #

A Formula specification used in RuleSpec specifications.

Constructors

FSubst Name (Subst Name)

A substitution φ[n ↦ t]: formula φ with variable n replaced by term t.

FPlaceholder Name

A placeholder for Formulae φ.

FPred Name [TermSpec]

A predicate.

FInfixPred Name TermSpec TermSpec

An infix predicate.

FOpr Text [FormulaSpec]

An n-ary operator.

FQuantifier Name Name FormulaSpec

A quantifier ∀x.φ.

Instances

Instances details
PrettyPrint FormulaSpec Source # 
Instance details

Defined in Specification.Types

Show FormulaSpec Source # 
Instance details

Defined in Specification.Types

Eq FormulaSpec Source # 
Instance details

Defined in Specification.Types

data AssumptionSpec Source #

An Assumption specification used in RuleSpec specifications.

Constructors

AssumptionSpec FormulaSpec

Regular FormulaSpec.

FFreshVar Name

A fresh-variable constraint [c].