This PR fixes the `grind +splitImp` and the arrow propagator. Given `p : Prop`, the propagator was incorrectly assuming `A` was always a proposition in an arrow `A -> p`. This PR also adds a missing normalization rule to `grind`.
19 lines
597 B
Text
19 lines
597 B
Text
set_option grind.warning false
|
||
variable {α : Type u} {l : List α} {P Q : α → Bool}
|
||
|
||
attribute [grind] List.countP_nil List.countP_cons
|
||
|
||
theorem List.countP_le_countP (hpq : ∀ x ∈ l, P x → Q x) :
|
||
l.countP P ≤ l.countP Q := by
|
||
induction l with
|
||
| nil => grind
|
||
| cons x xs ih =>
|
||
grind
|
||
|
||
theorem List.countP_lt_countP (hpq : ∀ x ∈ l, P x → Q x) (y:α) (hx: y ∈ l) (hxP : P y = false) (hxQ : Q y) :
|
||
l.countP P < l.countP Q := by
|
||
induction l with
|
||
| nil => grind
|
||
| cons x xs ih =>
|
||
have : xs.countP P ≤ xs.countP Q := countP_le_countP (by grind)
|
||
grind
|