Documentation

Init.Data.String.Lemmas.Pattern.TakeDrop.Pred

@[simp]
theorem String.Slice.Pos.skip?_bool_eq_some_iff {p : CharBool} {s : Slice} {pos res : s.Pos} :
pos.skip? p = some res (h : pos s.endPos), res = pos.next h p (pos.get h) = true
@[simp]
theorem String.Slice.Pos.skip?_bool_eq_none_iff {p : CharBool} {s : Slice} {pos : s.Pos} :
pos.skip? p = none ∀ (h : pos s.endPos), p (pos.get h) = false
theorem String.Slice.Pos.apply_skipWhile_bool_eq_false {p : CharBool} {s : Slice} {pos : s.Pos} {h : pos.skipWhile p s.endPos} :
p ((pos.skipWhile p).get h) = false
theorem String.Slice.Pos.skipWhile_bool_eq_self_iff_get {p : CharBool} {s : Slice} {pos : s.Pos} :
pos.skipWhile p = pos ∀ (h : pos s.endPos), p (pos.get h) = false
theorem String.Slice.Pos.apply_eq_true_of_lt_skipWhile_bool {p : CharBool} {s : Slice} {pos pos' : s.Pos} (h₁ : pos pos') (h₂ : pos' < pos.skipWhile p) :
p (pos'.get ) = true
theorem String.Slice.apply_eq_true_of_lt_skipPrefixWhile_bool {p : CharBool} {s : Slice} {pos : s.Pos} (h : pos < s.skipPrefixWhile p) :
p (pos.get ) = true
@[simp]
theorem String.Slice.all_bool_eq {p : CharBool} {s : Slice} :
s.all p = s.copy.toList.all p
@[simp]
theorem String.Slice.Pos.skip?_prop_eq_some_iff {P : CharProp} [DecidablePred P] {s : Slice} {pos res : s.Pos} :
pos.skip? P = some res (h : pos s.endPos), res = pos.next h P (pos.get h)
@[simp]
theorem String.Slice.Pos.skip?_prop_eq_none_iff {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} :
pos.skip? P = none ∀ (h : pos s.endPos), ¬P (pos.get h)
theorem String.Slice.Pos.apply_skipWhile_prop {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} {h : pos.skipWhile P s.endPos} :
¬P ((pos.skipWhile P).get h)
theorem String.Slice.Pos.skipWhile_prop_eq_self_iff_get {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} :
pos.skipWhile P = pos ∀ (h : pos s.endPos), ¬P (pos.get h)
theorem String.Slice.Pos.apply_of_lt_skipWhile_prop {P : CharProp} [DecidablePred P] {s : Slice} {pos pos' : s.Pos} (h₁ : pos pos') (h₂ : pos' < pos.skipWhile P) :
P (pos'.get )
theorem String.Slice.apply_of_lt_skipPrefixWhile_prop {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} (h : pos < s.skipPrefixWhile P) :
P (pos.get )
@[simp]
theorem String.Slice.all_prop_eq {P : CharProp} [DecidablePred P] {s : Slice} :
s.all P = s.copy.toList.all fun (x : Char) => decide (P x)
theorem String.Slice.skipSuffix?_bool_eq_some_iff {p : CharBool} {s : Slice} {pos : s.Pos} :
s.skipSuffix? p = some pos (h : s.endPos s.startPos), pos = s.endPos.prev h p ((s.endPos.prev h).get ) = true
@[simp]
theorem String.Slice.Pos.revSkip?_bool_eq_some_iff {p : CharBool} {s : Slice} {pos res : s.Pos} :
pos.revSkip? p = some res (h : pos s.startPos), res = pos.prev h p ((pos.prev h).get ) = true
@[simp]
theorem String.Slice.Pos.revSkip?_bool_eq_none_iff {p : CharBool} {s : Slice} {pos : s.Pos} :
pos.revSkip? p = none ∀ (h : pos s.startPos), p ((pos.prev h).get ) = false
theorem String.Slice.Pos.apply_revSkipWhile_bool_eq_false {p : CharBool} {s : Slice} {pos : s.Pos} {h : pos.revSkipWhile p s.startPos} :
p (((pos.revSkipWhile p).prev h).get ) = false
theorem String.Slice.Pos.revSkipWhile_bool_eq_self_iff_get {p : CharBool} {s : Slice} {pos : s.Pos} :
pos.revSkipWhile p = pos ∀ (h : pos s.startPos), p ((pos.prev h).get ) = false
theorem String.Slice.Pos.apply_eq_true_of_revSkipWhile_le_bool {p : CharBool} {s : Slice} {pos pos' : s.Pos} (h₁ : pos' < pos) (h₂ : pos.revSkipWhile p pos') :
p (pos'.get ) = true
theorem String.Slice.apply_eq_true_of_skipSuffixWhile_le_bool {p : CharBool} {s : Slice} {pos : s.Pos} (h : s.skipSuffixWhile p pos) (h' : pos < s.endPos) :
p (pos.get ) = true
@[simp]
theorem String.Slice.revAll_bool_eq {p : CharBool} {s : Slice} :
@[simp]
theorem String.Slice.Pos.revSkip?_prop_eq_some_iff {P : CharProp} [DecidablePred P] {s : Slice} {pos res : s.Pos} :
pos.revSkip? P = some res (h : pos s.startPos), res = pos.prev h P ((pos.prev h).get )
@[simp]
theorem String.Slice.Pos.revSkip?_prop_eq_none_iff {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} :
pos.revSkip? P = none ∀ (h : pos s.startPos), ¬P ((pos.prev h).get )
theorem String.Slice.Pos.apply_revSkipWhile_prop {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} {h : pos.revSkipWhile P s.startPos} :
¬P (((pos.revSkipWhile P).prev h).get )
theorem String.Slice.Pos.revSkipWhile_prop_eq_self_iff_get {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} :
pos.revSkipWhile P = pos ∀ (h : pos s.startPos), ¬P ((pos.prev h).get )
theorem String.Slice.Pos.apply_of_revSkipWhile_le_prop {P : CharProp} [DecidablePred P] {s : Slice} {pos pos' : s.Pos} (h₁ : pos' < pos) (h₂ : pos.revSkipWhile P pos') :
P (pos'.get )
theorem String.Slice.apply_of_skipSuffixWhile_le_prop {P : CharProp} [DecidablePred P] {s : Slice} {pos : s.Pos} (h : s.skipSuffixWhile P pos) (h' : pos < s.endPos) :
P (pos.get )
@[simp]
theorem String.Slice.revAll_prop_eq {P : CharProp} [DecidablePred P] {s : Slice} :
s.revAll P = s.copy.toList.all fun (x : Char) => decide (P x)
@[simp]
theorem String.Pos.skip?_bool_eq_some_iff {p : CharBool} {s : String} {pos res : s.Pos} :
pos.skip? p = some res (h : pos s.endPos), res = pos.next h p (pos.get h) = true
@[simp]
theorem String.Pos.skip?_bool_eq_none_iff {p : CharBool} {s : String} {pos : s.Pos} :
pos.skip? p = none ∀ (h : pos s.endPos), p (pos.get h) = false
theorem String.Pos.apply_skipWhile_bool_eq_false {p : CharBool} {s : String} {pos : s.Pos} {h : pos.skipWhile p s.endPos} :
p ((pos.skipWhile p).get h) = false
theorem String.Pos.skipWhile_bool_eq_self_iff_get {p : CharBool} {s : String} {pos : s.Pos} :
pos.skipWhile p = pos ∀ (h : pos s.endPos), p (pos.get h) = false
theorem String.Pos.apply_eq_true_of_lt_skipWhile_bool {p : CharBool} {s : String} {pos pos' : s.Pos} (h₁ : pos pos') (h₂ : pos' < pos.skipWhile p) :
p (pos'.get ) = true
theorem String.apply_eq_true_of_lt_skipPrefixWhile_bool {p : CharBool} {s : String} {pos : s.Pos} (h : pos < s.skipPrefixWhile p) :
p (pos.get ) = true
@[simp]
theorem String.all_bool_eq {p : CharBool} {s : String} :
s.all p = s.toList.all p
theorem String.skipSuffix?_bool_eq_some_iff {p : CharBool} {s : String} {pos : s.Pos} :
s.skipSuffix? p = some pos (h : s.endPos s.startPos), pos = s.endPos.prev h p ((s.endPos.prev h).get ) = true
theorem String.skipSuffix?_prop_eq_some_iff {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} :
s.skipSuffix? P = some pos (h : s.endPos s.startPos), pos = s.endPos.prev h P ((s.endPos.prev h).get )
@[simp]
theorem String.Pos.skip?_prop_eq_some_iff {P : CharProp} [DecidablePred P] {s : String} {pos res : s.Pos} :
pos.skip? P = some res (h : pos s.endPos), res = pos.next h P (pos.get h)
@[simp]
theorem String.Pos.skip?_prop_eq_none_iff {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} :
pos.skip? P = none ∀ (h : pos s.endPos), ¬P (pos.get h)
theorem String.Pos.apply_skipWhile_prop {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} {h : pos.skipWhile P s.endPos} :
¬P ((pos.skipWhile P).get h)
theorem String.Pos.skipWhile_prop_eq_self_iff_get {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} :
pos.skipWhile P = pos ∀ (h : pos s.endPos), ¬P (pos.get h)
theorem String.Pos.apply_of_lt_skipWhile_prop {P : CharProp} [DecidablePred P] {s : String} {pos pos' : s.Pos} (h₁ : pos pos') (h₂ : pos' < pos.skipWhile P) :
P (pos'.get )
theorem String.apply_of_lt_skipPrefixWhile_prop {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} (h : pos < s.skipPrefixWhile P) :
P (pos.get )
@[simp]
theorem String.all_prop_eq {P : CharProp} [DecidablePred P] {s : String} :
s.all P = s.toList.all fun (x : Char) => decide (P x)
@[simp]
theorem String.Pos.revSkip?_bool_eq_some_iff {p : CharBool} {s : String} {pos res : s.Pos} :
pos.revSkip? p = some res (h : pos s.startPos), res = pos.prev h p ((pos.prev h).get ) = true
@[simp]
theorem String.Pos.revSkip?_bool_eq_none_iff {p : CharBool} {s : String} {pos : s.Pos} :
pos.revSkip? p = none ∀ (h : pos s.startPos), p ((pos.prev h).get ) = false
theorem String.Pos.apply_revSkipWhile_bool_eq_false {p : CharBool} {s : String} {pos : s.Pos} {h : pos.revSkipWhile p s.startPos} :
p (((pos.revSkipWhile p).prev h).get ) = false
theorem String.Pos.revSkipWhile_bool_eq_self_iff_get {p : CharBool} {s : String} {pos : s.Pos} :
pos.revSkipWhile p = pos ∀ (h : pos s.startPos), p ((pos.prev h).get ) = false
theorem String.Pos.apply_eq_true_of_revSkipWhile_le_bool {p : CharBool} {s : String} {pos pos' : s.Pos} (h₁ : pos' < pos) (h₂ : pos.revSkipWhile p pos') :
p (pos'.get ) = true
theorem String.apply_eq_true_of_skipSuffixWhile_le_bool {p : CharBool} {s : String} {pos : s.Pos} (h : s.skipSuffixWhile p pos) (h' : pos < s.endPos) :
p (pos.get ) = true
@[simp]
theorem String.revAll_bool_eq {p : CharBool} {s : String} :
s.revAll p = s.toList.all p
@[simp]
theorem String.Pos.revSkip?_prop_eq_some_iff {P : CharProp} [DecidablePred P] {s : String} {pos res : s.Pos} :
pos.revSkip? P = some res (h : pos s.startPos), res = pos.prev h P ((pos.prev h).get )
@[simp]
theorem String.Pos.revSkip?_prop_eq_none_iff {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} :
pos.revSkip? P = none ∀ (h : pos s.startPos), ¬P ((pos.prev h).get )
theorem String.Pos.apply_revSkipWhile_prop {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} {h : pos.revSkipWhile P s.startPos} :
¬P (((pos.revSkipWhile P).prev h).get )
theorem String.Pos.revSkipWhile_prop_eq_self_iff_get {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} :
pos.revSkipWhile P = pos ∀ (h : pos s.startPos), ¬P ((pos.prev h).get )
theorem String.Pos.apply_of_revSkipWhile_le_prop {P : CharProp} [DecidablePred P] {s : String} {pos pos' : s.Pos} (h₁ : pos' < pos) (h₂ : pos.revSkipWhile P pos') :
P (pos'.get )
theorem String.apply_of_skipSuffixWhile_le_prop {P : CharProp} [DecidablePred P] {s : String} {pos : s.Pos} (h : s.skipSuffixWhile P pos) (h' : pos < s.endPos) :
P (pos.get )
@[simp]
theorem String.revAll_prop_eq {P : CharProp} [DecidablePred P] {s : String} :
s.revAll P = s.toList.all fun (x : Char) => decide (P x)