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

Fitch.Proof

Description

This module defines data types for representing Fitch Proofs, together with utilities for pretty-printing, indexing, querying, updating, and reordering Proofs.

Synopsis

Pretty-printing

class PrettyPrint a where Source #

Type class for pretty printing as Text.

Methods

prettyPrint :: a -> Text Source #

Converts a value to its textual representation.

Instances

Instances details
PrettyPrint Assumption Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint Derivation Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint Proof Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint RawAssumption Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint RawFormula Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint Reference Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint RuleApplication Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint Term Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint AssumptionSpec Source # 
Instance details

Defined in Specification.Types

PrettyPrint FormulaSpec Source # 
Instance details

Defined in Specification.Types

PrettyPrint TermSpec Source # 
Instance details

Defined in Specification.Types

PrettyPrint Text Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint (Wrapper RuleApplication) Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint (Wrapper a) Source # 
Instance details

Defined in Fitch.Proof

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

Defined in Specification.Types

Methods

prettyPrint :: Subst a -> Text Source #

PrettyPrint a => PrettyPrint (NonEmpty a) Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint a => PrettyPrint (Maybe a) Source # 
Instance details

Defined in Fitch.Proof

Methods

prettyPrint :: Maybe a -> Text Source #

PrettyPrint a => PrettyPrint [a] Source # 
Instance details

Defined in Fitch.Proof

Methods

prettyPrint :: [a] -> Text Source #

PrettyPrint a => PrettyPrint (Map Name a) Source # 
Instance details

Defined in Fitch.Proof

Methods

prettyPrint :: Map Name a -> Text Source #

(PrettyPrint a, PrettyPrint b) => PrettyPrint (Either a b) Source # 
Instance details

Defined in Fitch.Proof

Methods

prettyPrint :: Either a b -> Text Source #

(PrettyPrint a, PrettyPrint b) => PrettyPrint (a, b) Source # 
Instance details

Defined in Fitch.Proof

Methods

prettyPrint :: (a, b) -> Text Source #

Parsed wrappers

data Wrapper a where Source #

Wraps data with parsing and semantic information.

Constructors

ParsedValid :: forall a. Text -> a -> Wrapper a

Semantically valid parse success.

ParsedInvalid

Semantically invalid parse success.

Fields

  • :: forall a. Text

    User input.

  • -> Text

    Error message.

  • -> a

    Inner value.

  • -> Wrapper a
     
Unparsed

Parse failure.

Fields

Instances

Instances details
PrettyPrint Assumption Source # 
Instance details

Defined in Fitch.Proof

Functor Wrapper Source # 
Instance details

Defined in Fitch.Proof

Methods

fmap :: (a -> b) -> Wrapper a -> Wrapper b #

(<$) :: a -> Wrapper b -> Wrapper a #

PrettyPrint (Wrapper RuleApplication) Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint (Wrapper a) Source # 
Instance details

Defined in Fitch.Proof

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

Defined in Fitch.Proof

Methods

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

show :: Wrapper a -> String #

showList :: [Wrapper a] -> ShowS #

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

Defined in Fitch.Proof

Methods

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

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

isUnparsed :: Wrapper a -> Bool Source #

Returns whether a Wrapper represents a parse failure.

isParseValid :: Wrapper a -> Bool Source #

Returns whether a Wrapper represents a semantically valid parse.

fromWrapper :: Wrapper a -> Maybe a Source #

Extract data from a wrapper, returns Nothing if no data is present.

getText :: Wrapper a -> Text Source #

Extract text value from a wrapper, always succeeds.

proofPreviewTex :: Proof -> Text Source #

Renders a short preview of a Proof as assumptions followed by its conclusion.

Proof Types

type Name = Text Source #

Type of symbolic names such as variables, predicates, rules, and operators.

data Term Source #

A term in first-order logics consists either of a variable or a function applied to terms.

Constructors

Var Name

A single variable in first-order logic

Fun Name [Term]

A function applied to terms in first-order logic

Instances

Instances details
PrettyPrint Term Source # 
Instance details

Defined in Fitch.Proof

AllVars Term Source # 
Instance details

Defined in Fitch.Unification

FreeVars Term Source # 
Instance details

Defined in Fitch.Unification

Methods

freeVars :: Term -> Set Name Source #

Show Term Source # 
Instance details

Defined in Fitch.Proof

Methods

showsPrec :: Int -> Term -> ShowS #

show :: Term -> String #

showList :: [Term] -> ShowS #

Eq Term Source # 
Instance details

Defined in Fitch.Proof

Methods

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

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

Ord Term Source # 
Instance details

Defined in Fitch.Proof

Methods

compare :: Term -> Term -> Ordering #

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

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

(>) :: Term -> Term -> Bool #

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

max :: Term -> Term -> Term #

min :: Term -> Term -> Term #

Substitute RawFormula Term Source # 
Instance details

Defined in Fitch.Unification

Substitute Term Term Source # 
Instance details

Defined in Fitch.Unification

Methods

subst :: Subst Term -> Term -> Term Source #

isFun :: Term -> Bool Source #

Returns whether a Term is a function application.

data RawFormula Source #

A formula of first-order logic. It can also represent propositional formulae by using Pred without any Terms.

Constructors

Pred Name [Term]

A predicate applied to terms.

InfixPred Name Term Term

A predicate written in infix notation.

Opr Text [RawFormula]

An n-ary operator, like -> for implication, or ~ for negation.

Quantifier Name Name RawFormula

A quantifier, like for universal quantification.

Instances

Instances details
FromText RawFormula Source # 
Instance details

Defined in App.Update

PrettyPrint RawFormula Source # 
Instance details

Defined in Fitch.Proof

AllVars RawFormula Source # 
Instance details

Defined in Fitch.Unification

FreeVars RawFormula Source # 
Instance details

Defined in Fitch.Unification

Show RawFormula Source # 
Instance details

Defined in Fitch.Proof

Eq RawFormula Source # 
Instance details

Defined in Fitch.Proof

Ord RawFormula Source # 
Instance details

Defined in Fitch.Proof

Substitute RawFormula Term Source # 
Instance details

Defined in Fitch.Unification

data Reference where Source #

A reference to either a single line or a whole subproof.

Constructors

LineReference :: Int -> Reference

Referencing a single line.

ProofReference :: Int -> Int -> Reference

Referencing a subproof by its line range.

Instances

Instances details
PrettyPrint Reference Source # 
Instance details

Defined in Fitch.Proof

Show Reference Source # 
Instance details

Defined in Fitch.Proof

Eq Reference Source # 
Instance details

Defined in Fitch.Proof

type Formula = Wrapper RawFormula Source #

A formula with parsing and semantic information.

data RawAssumption Source #

The raw content of an Assumption.

Constructors

FreshVar Name

A fresh variable of a Proof, written like [c].

RawAssumption RawFormula

A regular RawFormula.

Instances

Instances details
FromText RawAssumption Source # 
Instance details

Defined in App.Update

PrettyPrint Assumption Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint RawAssumption Source # 
Instance details

Defined in Fitch.Proof

AllVars RawAssumption Source # 
Instance details

Defined in Fitch.Unification

FreeVars RawAssumption Source # 
Instance details

Defined in Fitch.Unification

Show RawAssumption Source # 
Instance details

Defined in Fitch.Proof

Eq RawAssumption Source # 
Instance details

Defined in Fitch.Proof

type Assumption = (Wrapper RawAssumption, Wrapper RuleApplication) Source #

A wrapped assumption together with its attached RuleApplication for easily converting between Assumption and Derivation.

mkAssumption :: Wrapper RawAssumption -> Assumption Source #

Constructs an Assumption with the default rule (⊤I).

toAssumption :: Derivation -> Assumption Source #

Converts a Derivation into an Assumption by wrapping its formula as a RawAssumption.

toDerivation :: Assumption -> Derivation Source #

Converts an Assumption into a Derivation. Fresh-variable assumptions cannot be converted to formulas and are therefore turned into Unparsed.

data RuleApplication Source #

Application of a rule.

Constructors

RuleApplication Name [Reference]

Application of a rule, consisting of the rule Name and a list of References.

Instances

Instances details
FromText RuleApplication Source # 
Instance details

Defined in App.Update

PrettyPrint Assumption Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint RuleApplication Source # 
Instance details

Defined in Fitch.Proof

Show RuleApplication Source # 
Instance details

Defined in Fitch.Proof

Eq RuleApplication Source # 
Instance details

Defined in Fitch.Proof

PrettyPrint (Wrapper RuleApplication) Source # 
Instance details

Defined in Fitch.Proof

data Derivation Source #

A derivation inside a Proof.

Constructors

Derivation Formula (Wrapper RuleApplication)

A single proof line consisting of a Formula and the RuleApplication that justifies it.

Instances

Instances details
PrettyPrint Derivation Source # 
Instance details

Defined in Fitch.Proof

Show Derivation Source # 
Instance details

Defined in Fitch.Proof

Eq Derivation Source # 
Instance details

Defined in Fitch.Proof

data Proof where Source #

A datatype for representing Fitch-style proofs.

Constructors

SubProof :: [Assumption] -> [Either Derivation Proof] -> Derivation -> Proof

A sub proof consisting of Assumptions, Derivations, nested Proofs, and a conclusion.

Instances

Instances details
PrettyPrint Proof Source # 
Instance details

Defined in Fitch.Proof

Show Proof Source # 
Instance details

Defined in Fitch.Proof

Methods

showsPrec :: Int -> Proof -> ShowS #

show :: Proof -> String #

showList :: [Proof] -> ShowS #

Eq Proof Source # 
Instance details

Defined in Fitch.Proof

Methods

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

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

Folds and Maps

pFoldLines :: (a -> Assumption -> a) -> (a -> Derivation -> a) -> a -> Proof -> a Source #

pFoldLines af df s p folds the proof p line-wise to a value of type a with starting value s.

pLength :: Proof -> Int Source #

The pLength of a Proof is its total number of lines.

pFoldLinesM :: Monad m => (a -> Assumption -> m a) -> (a -> Derivation -> m a) -> a -> Proof -> m a Source #

Monadic variant of pFoldLines.

pSerialize :: (Assumption -> a) -> (Derivation -> a) -> ([a] -> a) -> (Derivation -> a) -> Proof -> [a] Source #

Serializes a Proof by mapping Assumptions, Derivations, Proofs, and conclusions. Nested proofs are first serialized recursively and then combined with the given proof function.

pSerializeLines :: (Assumption -> a) -> (Derivation -> a) -> Proof -> [a] Source #

pSerializeLines af df p serializes the Proof p line-by-line, applying af to each Assumption and df to each Derivation, and collecting the results into a flat list.

pSerializeLinesWithAddr :: (NodeAddr -> Assumption -> a) -> (NodeAddr -> Derivation -> a) -> Proof -> [a] Source #

Like pSerializeLines but also passes the current NodeAddr to each mapping function.

pMapLines :: (Assumption -> Assumption) -> (Derivation -> Derivation) -> Proof -> Proof Source #

pMapLines af df p maps each line of the Proof p, applying af to every Assumption and df to every Derivation.

pMapLinesAccumL :: (s -> Assumption -> (s, Assumption)) -> (s -> Derivation -> (s, Derivation)) -> s -> Proof -> (s, Proof) Source #

Like pMapLines, but threads an accumulator from left to right.

pMapLinesWithLineNo :: (Int -> Assumption -> Assumption) -> (Int -> Derivation -> Derivation) -> Proof -> Proof Source #

Like pMapLines, but also passes the current line number to the mapping functions.

pMapLinesWithAddr :: (NodeAddr -> Assumption -> Assumption) -> (NodeAddr -> Derivation -> Derivation) -> Proof -> Proof Source #

Like pMapLines, but also passes the current NodeAddr to the mapping functions.

pMapLinesM :: Monad m => (Assumption -> m Assumption) -> (Derivation -> m Derivation) -> Proof -> m Proof Source #

Like pMapLines but lifted to monadic results.

pMapLinesMAccumL :: Monad m => (s -> Assumption -> m (s, Assumption)) -> (s -> Derivation -> m (s, Derivation)) -> s -> Proof -> m (s, Proof) Source #

Like pMapLinesM but threads an accumulator from left to right.

pMapRefs :: (Reference -> Maybe Reference) -> Proof -> Proof Source #

Maps every Reference in a Proof, optionally removing references by returning Nothing.

Indexing proofs

data NodeAddr Source #

This type is used for indexing lines in a proof. Its recursive structure makes defining functions that manipulate proofs more convenient

A NodeAddr may either be a reference to

Constructors

NAAssumption Int

The n-th assumption of the current proof.

NAConclusion

The conclusion of the current proof.

NAAfterConclusion

The position directly after the conclusion of the current proof.

NALine Int

The n-th derivation line of the current proof.

NAProof Int NodeAddr

A nested address inside the n-th subproof of the current proof.

Instances

Instances details
Show NodeAddr Source # 
Instance details

Defined in Fitch.Proof

Eq NodeAddr Source # 
Instance details

Defined in Fitch.Proof

Ord NodeAddr Source # 
Instance details

Defined in Fitch.Proof

isNAAssumption :: NodeAddr -> Bool Source #

Returns whether a NodeAddr points to an assumption of the current proof level.

isNestedNAAssumption :: NodeAddr -> Bool Source #

Returns whether a NodeAddr points to a possibly nested Assumption.

isNestedNAConclusion :: NodeAddr -> Bool Source #

Returns whether a NodeAddr points to a possibly nested Assumption.

naInSameProof :: NodeAddr -> NodeAddr -> Bool Source #

Returns whether two NodeAddrs are on the same level in the same Proof.

paInSameProof :: ProofAddr -> ProofAddr -> Bool Source #

Returns whether two ProofAddrs are on the same level in the same Proof.

isFirstLineIn :: Proof -> NodeAddr -> Bool Source #

Returns whether a NodeAddr is the first line in a Proof. This could be because:

  • it is the first assumption;
  • there are no assumptions and it is the first line;
  • there are no assumptions and it is the first line of the first subproof;
  • there are no assumptions, no lines, no subproofs and it is the conclusion.

data ProofAddr Source #

Address of a Proof within a Proof.

Constructors

PANested Int ProofAddr

A nested Proof.

PAProof

The current Proof.

Instances

Instances details
Show ProofAddr Source # 
Instance details

Defined in Fitch.Proof

Eq ProofAddr Source # 
Instance details

Defined in Fitch.Proof

Ord ProofAddr Source # 
Instance details

Defined in Fitch.Proof

paProofToNested :: ProofAddr -> ProofAddr -> ProofAddr Source #

Moves the given ProofAddr one level higher, returning a function that can be used to build ProofAddrs on the current level.

paContaining :: NodeAddr -> ProofAddr Source #

Returns the ProofAddr that contains the NodeAddr.

Conversion between line numbers and NodeAddr

fromLineNo :: Int -> Proof -> Maybe NodeAddr Source #

Takes a line number and returns the corresponding NodeAddr for a given Proof. Returns Nothing on error.

Note: NodeAddr indices start at 0, but line numbers start at 1.

fromNodeAddr :: NodeAddr -> Proof -> Maybe Int Source #

Takes a NodeAddr and returns the corresponding line number for a given Proof.

Note: NodeAddr indices start at 0, but line numbers start at 1.

lineNoOr999 :: NodeAddr -> Proof -> Int Source #

Like fromNodeAddr, but falls back to line number 999 if the NodeAddr is invalid.

fromLineRange :: Int -> Int -> Proof -> Maybe ProofAddr Source #

Returns the ProofAddr of the Proof spanning from the given start line to the given end line, or Nothing if no such Proof exists.

lineRangeFromProofAddr :: ProofAddr -> Proof -> Maybe (Int, Int) Source #

Returns the start and end line numbers of the Proof addressed by a ProofAddr. Returns Nothing if the ProofAddr is invalid.

Utilities for working with addresses

incrementNodeAddr :: NodeAddr -> Maybe NodeAddr Source #

Increments a NodeAddr index by 1, keeping the nesting structure unchanged. Returns Nothing for addresses without a numeric index (e.g. NAConclusion).

paFromNA :: NodeAddr -> Proof -> Maybe ProofAddr Source #

Converts a NodeAddr to a ProofAddr, by

For other NodeAddrs, returns Nothing.

naFromPA :: ProofAddr -> NodeAddr -> NodeAddr Source #

Turns a ProofAddr into a function for building a NodeAddr that is contained in the ProofAddr.

naLevelup2 :: NodeAddr -> Maybe (NodeAddr -> NodeAddr) Source #

Returns a function that lifts a nested NodeAddr by one proof level, if possible.

Querying proofs

proofErrors :: Proof -> Int Source #

Counts the number of parse or validation errors occurring in a Proof.

holdsAt :: (a -> Bool) -> [a] -> Int -> Bool Source #

Returns whether the element at the given index exists and satisfies a predicate.

holdsAtNA :: (Either Assumption Derivation -> Bool) -> Proof -> NodeAddr -> Bool Source #

Returns whether the element at the given NodeAddr exists and satisfies a predicate.

naValid :: NodeAddr -> Proof -> Bool Source #

Returns whether the NodeAddr is a valid address for the given Proof. (Valid in the sense that naLookup would return a valid result.)

naLookup :: NodeAddr -> Proof -> Maybe (Either Assumption Derivation) Source #

Returns the line at a given NodeAddr. Returns Nothing if the NodeAddr does not correspond to any line in the Proof.

paLookup :: ProofAddr -> Proof -> Maybe Proof Source #

Returns the Proof at a given ProofAddr if it exists.

pIndex :: Int -> Proof -> Maybe (Either Assumption Derivation) Source #

Returns the Assumption or Derivation at the given line number if it exists.

pIndexProof :: Int -> Int -> Proof -> Maybe Proof Source #

Returns the Proof spanning the given start and end line numbers if it exists.

naAffectsFreshness :: NodeAddr -> NodeAddr -> Bool Source #

Returns whether the second NodeAddr is relevant when checking freshness for the first NodeAddr.

I.e., whether the second NodeAddr appears before the first one, or appears on the same level.

pCollectFreshnessNodes :: Proof -> NodeAddr -> [(NodeAddr, Either Assumption Derivation)] Source #

Collects all lines relevant for freshness checking of the given NodeAddr.

Updating proof contents

naUpdateFormula :: Either (Assumption -> Assumption) (Formula -> Formula) -> NodeAddr -> Proof -> Maybe Proof Source #

naUpdateFormula f addr proof replaces the Assumption or tFormula at addr in proof using f. Pass Left to update an Assumption, or Right to update the Formula of a Derivation. Returns Nothing if the address does not exist or is incompatible with the chosen update function.

naUpdateRule :: (Wrapper RuleApplication -> Wrapper RuleApplication) -> NodeAddr -> Proof -> Maybe Proof Source #

naUpdateRule f addr proof updates the RuleApplication at addr in proof using f. Returns Nothing if the address does not exist or points to an Assumption (which has no editable RuleApplication).

(Re-)moving inside a proof

naRemoveRaw :: NodeAddr -> Proof -> Maybe Proof Source #

naRemoveRaw addr proof removes the element at a valid addr from proof without updating any References.

For the NAConclusion case: if the last element of ps is a Derivation, it is promoted to become the new conclusion. Otherwise Nothing is returned.

Note: Use naRemove if references must stay consistent.

paRemoveRaw :: ProofAddr -> Proof -> Maybe Proof Source #

Removes the Proof at a valid ProofAddr without updating references.

Note: Use paRemove if references must stay consistent.

naRemove :: NodeAddr -> Proof -> Maybe Proof Source #

Removes the line at a valid NodeAddr and updates all affected references.

paRemove :: ProofAddr -> Proof -> Maybe Proof Source #

Removes the Proof at a valid ProofAddr and updates all affected references.

naInsertBeforeRaw :: Either Assumption Derivation -> NodeAddr -> Proof -> Maybe (NodeAddr, Proof) Source #

Inserts a line before the given NodeAddr in the Proof, without updating References.

Returns the NodeAddr of the inserted line together with the updated Proof. Returns Nothing if line could not be inserted.

Note: Use naInsertBefore if references must stay consistent.

naInsertBefore :: Either Assumption Derivation -> NodeAddr -> Proof -> Maybe (NodeAddr, Proof) Source #

Like naInsertBeforeRaw, but also updates references affected by the insertion.

Returns the NodeAddr of the inserted line together with the updated Proof.

paInsertBeforeRaw :: Proof -> ProofAddr -> Proof -> Maybe (ProofAddr, Proof) Source #

Inserts a Proof before the Proof at the given ProofAddr without updating references. Returns Nothing if Proof could not be inserted.

Note: Use paInsertBefore if references must stay consistent.

paInsertBefore :: Proof -> ProofAddr -> Proof -> Maybe (ProofAddr, Proof) Source #

Like paInsertBeforeRaw, but also updates references affected by the insertion. Returns the ProofAddr of the inserted Proof together with the updated Proof.

naMoveBeforeRaw :: NodeAddr -> NodeAddr -> Proof -> Maybe (NodeAddr, Proof) Source #

Moves the line at source before the line at target in Proof p, without updating any References. Returns the updated target NodeAddr together with the modified Proof or Nothing on failure.

Note: Use naMoveBefore if references must stay consistent.

targetInRange :: Int -> (Int, Int) -> Proof -> Bool Source #

Returns whether lineNo falls within the given line range, accounting for same-proof boundary rules.

naMoveBefore :: NodeAddr -> NodeAddr -> Proof -> Maybe (NodeAddr, Proof) Source #

Moves the line at source before the line at target in Proof p, and updates all References affected by the move. Returns Nothing if the move is rejected by naCanMoveBefore.

naContainedIn :: NodeAddr -> ProofAddr -> Bool Source #

Returns whether a NodeAddr is contained in the Proof designated by a ProofAddr.

Note: does not check if the NodeAddr is valid!

paContainedIn :: ProofAddr -> ProofAddr -> Bool Source #

Returns whether a ProofAddr is contained in another ProofAddr.

Note: does not check if either ProofAddr is valid!

naSameOrNext :: NodeAddr -> NodeAddr -> Proof -> Bool Source #

Returns whether the target address is identical to, or immediately after, the source.

paSameOrNext :: ProofAddr -> ProofAddr -> Bool Source #

Returns whether the target address is identical to, or immediately after, the source.

naCanMoveConclusion :: NodeAddr -> Proof -> Bool Source #

Helper for deciding whether a NodeAddr may be moved to the target position defaulting to True and only does a real check for NAConclusion where it checks whether the conclusion has a Derivation that can take its place, when it moves.

naCanMoveBefore :: Proof -> NodeAddr -> NodeAddr -> Bool Source #

Returns whether a NodeAddr can be moved before the given target NodeAddr.

paCanMoveBefore :: ProofAddr -> ProofAddr -> Bool Source #

Returns whether a ProofAddr can be moved before the given target ProofAddr.

paMoveBeforeRaw :: ProofAddr -> ProofAddr -> Proof -> Maybe (ProofAddr, Proof) Source #

Moves a Proof before another Proof without updating references.

Note: Use paMoveBefore if references must stay consistent.

paMoveBefore :: ProofAddr -> ProofAddr -> Proof -> Maybe (ProofAddr, Proof) Source #

Moves a Proof before another Proof and updates all affected references.