Factors¶
Things relevant to a
Court
’s application of aRule
.The same
Factor
that is in theoutputs
for theProcedure
of one legalRule
might be in theinputs
of theProcedure
for another.Designate attributes inherited from Factor as keyword-only.
Get names of attributes to compare in
means()
or__ge__()
.This method and
interchangeable_factors()
should be the only parts of the context-matching process that need to be unique for each subclass ofFactor
.
List ways to reorder
context_factors
but preserveself
’s meaning.The empty list is the default return value for subclasses that don’t have any interchangeable
context_factors
.- Return type
List
[ContextRegister
]- Returns
the ways
context_factors
can be reordered without changing the meaning ofself
, or whether it would be true in a particular context.
Factor
s that can be replaced without changingself
s meaning.
Collect self’s
context_factors
, and theircontext_factors
, recursively.
Check if self and other can be non-contradictory.
- Return type
Iterator
[ContextRegister
]- Returns
a bool indicating whether there’s at least one way to match the
context_factors
ofself
andother
, such that they fit the relationshipcomparison
.
Test whether
self
implies the absence ofother
.- Return type
- Returns
True
if self and other can’t both be true at the same time. Otherwise returnsFalse
.
Test whether
self
implies()
the absence ofother
.This should only be called after confirming that
other
is notNone
.- Return type
Iterator[Explanation]
- Returns
True
if self and other can’t both be true at the same time. Otherwise returnsFalse
.
Get one explanation of why self and other have the same meaning.
- Return type
Optional
[ContextRegister
]
Get one explanation of why self and other contradict.
- Return type
Optional
[ContextRegister
]
Get one explanation of why self implies other.
- Return type
Optional
[ContextRegister
]
Make new object with attributes from
self.__dict__
, replacing attributes as specified.- Parameters
changes (
Union
[str
,Sequence
[str
],Dict
[str
,Any
]]) – adict
where the keys are names of attributes of self, and the values are new values for those attributes, or else an attribute name orlist
of names that need to have their values replaced with their boolean opposite.- Return type
- Returns
a new object initialized with attributes from
self.__dict__
, except that any attributes named as keys in the changes parameter are replaced by the corresponding value.
Test whether
self
andother
have identical meanings.
Generate ways to match contexts of self and other so they mean the same.
- Return type
Iterator
[ContextRegister
]
Search of
self
andself
’s attributes forFactor
with specifiedname
.
Generate
ContextRegister
s that cause self to imply other.If self is absent, then generate a ContextRegister from other’s point of view and then swap the keys and values.
- Return type
Iterator
[ContextRegister
]
Test whether
self
impliesother
.- Return type
Test whether
self
impliesother
andself
!=other
.- Return type
Test if relation holds for corresponding context factors of self and other.
This doesn’t track a persistent
ContextRegister
as it goes down the sequence ofFactor
pairs. Perhaps(?) this simpler process can weed outFactor
s that clearly don’t satisfy a comparison before moving on to the more costlyAnalogy
process. Or maybe it’s useful for testing.- Return type
Get a copy of
self
except ensuregeneric
isTrue
.Note
The new object created with this method will have all the attributes of
self
exceptgeneric=False
. Therefore the method isn’t equivalent to creating a new instance of the class with only thegeneric
attribute specified. To do that, you would useFact(generic=True)
.- Return type
- Returns
a new object changing
generic
toTrue
.
Create new
Factor
, replacing keys ofchanges
with values.
Return attributes of
self
that aren’t inherited from another class.Used for getting parameters to pass to
__init__()
when generating a new object.
Return str(self).
Return string representation without line breaks.
- Return type
Find ways to update
self_mapping
to allow relationshipcomparison
.- Parameters
other (
Optional
[Factor
]) – anotherFactor
being compared toself
register (
ContextRegister
) – keys representingFactor
s fromself
’s context and values representingFactor
s inother
’s context.comparison (
Callable
) – a function defining the comparison that must beTrue
betweenself
andother
. Could beFactor.means()
orFactor.__ge__()
.
- Yields
every way that
self_mapping
can be updated to be consistent withself
andother
having the relationshipcomparison
.- Return type
Iterator
[ContextRegister
]
list of weak references to the object (if defined)
Entities¶
Things that exist in the outside world, like people, places, or events.
Not concepts that derive their meaning from litigation, such as a legal Fact, an Allegation, a Pleading, etc.
Best used to specify things to be mentioned in multiple
Factor
s in aRule
, often in thePredicate
of aFact
object.An
Entity
is often, but not always,generic
with respect to the meaning of theRule
in which it is mentioned, which means that theRule
is understood to apply generally even if some otherEntity
was substituted.- Parameters
name (Optional[str]) – An identifier. An
Entity
with the samename
is considered to refer to the same specific object, but if they have different names but aregeneric
and are otherwise the same, then they’re considered to have the same meaning and they evaluate equal to one another.generic (bool) – Determines whether a change in the
name
of theEntity
would change the meaning of theFactor
in which theEntity
is embedded.plural (bool) – Specifies whether the
Entity
object refers to more than one thing. In other words, whether it would be represented by a plural noun.
Test whether
other
has the same meaning asself
.Generic
Entity
objects are considered equivalent in meaning as long as they’re the same class. If notgeneric
, they’re considered equivalent if all their attributes are the same.
Call
implies()
as an alias.- Returns
bool indicating whether
self
impliesother
Return str(self).
Create new
Factor
, replacing keys ofchanges
with values.Assumes no changes are possible because the
new_context_helper()
decorator would have replacedself
if any replacement was available.- Return type
Facts¶
An assertion accepted as factual by a court.
Often based on factfinding by a judge or jury.
- Parameters
predicate (
Predicate
) – a natural-language clause with zero or more slots to insertcontext_factors
that are typically the subject and objects of the clause.context_factors (
Sequence
[Factor
]) – a series ofFactor
objects that fill in the blank spaces in thepredicate
statement.name (
Optional
[str
]) – an identifier for this object, often used if the object needs to be referred to multiple times in the process of composing otherFactor
objects.standard_of_proof (
Optional
[str
]) – a descriptor for the degree of certainty associated with the assertion in thepredicate
.absent (
bool
) – whether the absence, rather than the presence, of the legal fact described above is being asserted.generic (
bool
) – whether this object could be replaced by another generic object of the same class without changing the truth of theRule
in which it is mentioned.
- Attr standards_of_proof
a tuple with every allowable name for a standard of proof, in order from weakest to strongest.
Exhibits¶
A source of information for use in litigation.
- Parameters
form (
Optional
[str
]) – a term describing the category of exhibit. For example: testimony, declaration, document, or recording.statement (
Optional
[Fact
]) – a fact assertion made via the exhibit. For instance, if the exhibit is a document, this parameter could refer to a statement printed on the document.statement_attribution (
Optional
[Entity
]) – theEntity
that the exhibit imputes the statement to. For instance, for a signed declaration, this would refer to the person whose signature appears on the declaration, regardless of any authentication concerns. The statement_attribution parameter may appear without the statement parameter, especially if the content of the statement is irrelevant.absent (
bool
) – if True, indicates that no exhibit meeting the description exists in the litigation. If the exhibit has merely been rejected as evidence, use the absent attribute on anEvidence
object instead.generic (
bool
) – if True, indicates that the specific attributes of the exhibit are irrelevant in the context of theHolding
where the exhibit is being referenced.
Evidence¶
An
Exhibit
admitted by a court to aid a factual determination.- Parameters
exhibit (
Optional
[Exhibit
]) – the thing that is being used to aid a factual determinationto_effect (
Optional
[Fact
]) – theFact
finding that would be supported by the evidence. If the Fact object includes a non-null standard_of_proof attribute, it indicates that that the evidence would support a factual finding by that standard of proof.absent (
bool
) – if True, indicates that no evidence meeting the description has been admitted, regardless of whether a correspondingExhibit
has been presentedgeneric (
bool
) – if True, indicates that the specific attributes of the evidence are irrelevant in the context of theHolding
where the evidence is being referenced.