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
) – aProcedure
containing the inputs, and despiteFactor
s and resulting outputs when this rule is triggered.enactments (
Union
[Enactment
,EnactmentGroup
,Sequence
[Enactment
],None
]) – theEnactment
s cited as authority for invoking theprocedure
.enactments_despite (
Union
[Enactment
,EnactmentGroup
,Sequence
[Enactment
],None
]) – theEnactment
s specifically cited as failing to preclude application of theprocedure
.mandatory (
bool
) – whether theprocedure
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 theRule
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 thisRule
when needed for the composition of anotherFactor
object.
Initialize self. See help(type(self)) for accurate signature.
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.Does not test whether
self
could be triggered by the outputs of other. Useother + 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
’sterms()
method.- Return type
- Returns
terms from
self
’sProcedure
Get
Factor
s that can be replaced without changingself
s meaning.- Return type
- Returns
generic
Factor
s fromself
’sProcedure
Add Enactment and sort self’s Enactments.
Add “despite” Enactment and sort self’s “despite” Enactments.
Create new Rule with added Enactment.
Create new Rule with added “despite” Enactment.
Add a
Factor
to self.inputs.
Make new version of
self
with an added inputFactor
.
Check if other can be compared to self for implication or contradiction.
- Return type
Test if
self
contradictsother
.
Find context matches that would result in a contradiction with other.
- Return type
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
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.
Count generic
Factor
s needed as context for thisRule
.- Returns
the number of generic
Factor
s needed for self’sProcedure
.
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
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 str(self).