Rules
¶
A statement of a legal doctrine about a
Procedure
for litigation.May decide some aspect of current litigation, and also potentially may be cided and reused by future courts. When
Rule
s appear as judicial holdings they are often hypothetical and don’t necessarily imply that the court accepts theFact
assertions or otherFactor
s that make up the inputs or outputs of theProcedure
mentioned in theRule
.- Parameters
procedure (Procedure) – a
Procedure
containing the inputs, and despiteFactor
s and resulting outputs when this rule is triggered.enactments (Iterable[Enactment]) – the
Enactment
s cited as authority for invoking theprocedure
.enactments_despite (Iterable[Enactment]) – the
Enactment
s specifically cited as failing to preclude application of theprocedure
.mandatory (bool) – whether the
procedure
is mandatory for the court to apply whenever theRule
is properly invoked.False
means that theprocedure
is “discretionary”.universal (bool) –
True
if theprocedure
is applicable whenever its inputs are present.False
means that theprocedure
is applicable in “some” situation where the inputs are present.generic (bool) – whether the
Rule
is being mentioned in a generic context. e.g., if theRule
is being mentioned in anArgument
object merely as an example of the kind ofRule
that might be mentioned in such anArgument
.name (Optional[str]) – an identifier used to retrieve this
Rule
when needed for the composition of anotherFactor
object.
Create new
Rule
ifself
can satisfy theinputs
ofother
.If both
self
andother
have False foruniversal
, then returnsNone
. Otherwise:If the union of the
inputs
andoutputs
ofself
would triggerother
, then return a new version ofself
with the outputFactor
s ofother
as well as the outputs ofself
.The new
universal
andmandatory
values are the lesser of the old values for each.Don’t test whether
self
could be triggered by the outputs of other. Let user doother + self
for that.
Make contrapositive forms of this
Rule
.Used when converting from JSON input containing the entry
"exclusive": True
, which means the specifiedinputs`
are the only way to reach the specified output. When that happens, it can be inferred that in the absence of any of the inputs, the output must also be absent. (Multipleoutputs
are not allowed when theexclusive
flag isTrue
.) So, this generator will yield one newRule
for each input.
Call
Procedure
’scontext_factors()
method.- Return type
- Returns
context_factors from
self
’sProcedure
Get
Factor
s that can be replaced without changingself
s meaning.
Make new version of
self
with anEnactment
added.
Make new version of
self
with an added input, output, or despiteFactor
.
Test if
self
contradictsother
.
Find context matches that would result in a contradiction with other.
- Return type
Iterator
[ContextRegister
]
Test whether
self
’sEnactment
support is a subset ofother
’s.A
Rule
makes a more powerful statement if it relies on fewerEnactment
s (or applies despite moreEnactment
s).So this method must return
True
forself
to implyother
.- Return type
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 if
self
impliesother
if posited in valid and decidedHolding
s.If
self
relies for support on someEnactment
text thatother
doesn’t, thenself
doesn’t implyother
.Also, if
other
specifies that it applies notwithstanding someEnactment
not mentioned byself
, thenself
doesn’t implyother
.This will be called as part of the
Holding.__ge__()
implication function.
Test if
self
hasEnactment
s with same meanings asother
’s.
Find context matches that would result in self and other meaning the same.
- Return type
Iterator
[ContextRegister
]
Test whether
other
has the same meaning asself
.
Create new
Rule
showing combined effect of all inputs ofself
andother
.This operation is destructive in the sense that the new
Rule
may not contain all the information that was available inself
andother
.This seems to work differently when one Rule implies the other. That could mean there is a union to return even when both Rules are SOME rules. Or it could mean an ALL rule should be returned even though
implied
is SOME, because implied contributes no information that wasn’t already ingreater
.
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).