Comparison operator for HAVING enumeration algorithms #
Shared definition used by Provenance.Algorithms.CountEnum,
Provenance.Algorithms.SumDP and Provenance.HavingMinMax. The operator
parameter is op ∈ {=, ≠, <, ≤, >, ≥}.
Comparison operator, as used by the HAVING enumeration algorithms.
Instances For
Dependency graph
@[instance_reducible]
Dependency graph
Equations
- instReprCompOp.repr CompOp.eq prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CompOp.eq")).group prec✝
- instReprCompOp.repr CompOp.ne prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CompOp.ne")).group prec✝
- instReprCompOp.repr CompOp.lt prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CompOp.lt")).group prec✝
- instReprCompOp.repr CompOp.le prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CompOp.le")).group prec✝
- instReprCompOp.repr CompOp.gt prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CompOp.gt")).group prec✝
- instReprCompOp.repr CompOp.ge prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "CompOp.ge")).group prec✝
Instances For
Dependency graph
@[instance_reducible]
Equations
- instReprCompOp = { reprPrec := instReprCompOp.repr }
Dependency graph
Semantics of a comparison operator over any linearly ordered value
domain (the aggregate values compared by a HAVING predicate; the
enumeration algorithms use it at V = ℕ).
Equations
Instances For
Dependency graph
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
Dependency graph
The complementary comparison operator: op.negate holds exactly when
op does not. This is how ProvSQL interprets NOT over an aggregate
comparison (PostgreSQL's operator negator), with NOT pushed through
Boolean combinations by De Morgan duality.