Constructor
new Sequent(conclusion, containeropt)
Construct a new sequent ending in the given conclusion
. Its list of
accessibles will be the premises, except with all of the modifications
described at the top of this file then applied to them. This function
is the workhorse of the class; it ensures that the sequent is not just
the conclusion preceded by its accessibles, but rather that all the
necessary adjustments have been made, as described above.
Parameters
-
conclusion
LogicConcept
the final child of the sequent to construct
-
container
LogicConcept
<optional>
the ancestor of
conclusion
in which to do the operation; only accessibles within this ancestor are considered for inclusion in the sequent, and this ancestor is treated as if it were the top-level "document" in whichconclusion
sits
Source
Classes
Members
attributesToKeep
The set of attribute keys that should be retained by the premises and conclusion of a sequent. All other attribute keys will be removed, to prevent incorrect results arising when comparing for equality two LogicConcepts that differ only in their attributes. Thus we place on this list only the most relevant attributes for the meaning of a LogicConcept for the purposes of validation--those are the text of a symbol and the given flag for any LogicConcept.
Source
Methods
conclusion() → {LogicConcept}
For a sequent, conclusion is the last child. See the documentation at the top of this file for more information on the structure of a sequent. Note that the conclusion is not the same one provided to the constructor of this sequent, but a copy created and stored in this sequent.
See
Returns
-
LogicConcept
the conclusion, as created by the constructor
Source
copy() → {Sequent}
Construct a copy of this object. Because a Sequent is also an Environment, this overrides the copy() function in that class, so that it does not return an Environment instance only, but a full Sequent instance. The copy will share the same originalPremises() and originalConclusion() as this object.
Returns
-
Sequent
a deep copy of this object
Source
originalConclusion() → {LogicConcept}
Since the constructor of a Sequent makes copies of the given conclusion and all of its relevant accessibles, it is not possible to tell, based only on the return values of premises() and conclusion(), what the original premises or conclusion were. Consequently, that constructor stores references to those originals, and you can get access to the originals through the use of this function, and originalPremises().
Returns
-
LogicConcept
the LogicConcept from which the last child of this Sequent was copied (the last child being the conclusion, and the others being the premises)
Source
originalPremises() → {Array.<LogicConcept>}
Since the constructor of a Sequent makes copies of the given conclusion and all of its relevant accessibles, it is not possible to tell, based only on the return values of premises() and conclusion(), what the original premises or conclusion were. Consequently, that constructor stores references to those originals, and you can get access to the originals through the use of this function, and originalConclusion().
Returns
-
Array.<LogicConcept>
the array of LogicConcepts from which the children of this Sequent were copied (excluding the last child, which is the conclusion)
Source
premises() → {Array.<LogicConcept>}
For a sequent, the premises are all the children but the last. See the documentation at the top of this file for more information on the structure of a sequent. Note that these premises do not appear anywhere in the user's MathConcept hierarchy; they are children only of this sequent object.
See
Returns
-
Array.<LogicConcept>
the array of premises, as computed by the constructor