Skip to content

Commit

Permalink
finished proving the common invariant for update_open_cell
Browse files Browse the repository at this point in the history
  • Loading branch information
ybertot committed Oct 21, 2024
1 parent 3b91293 commit 57b7a67
Show file tree
Hide file tree
Showing 3 changed files with 441 additions and 108 deletions.
11 changes: 11 additions & 0 deletions theories/cells.v
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,22 @@ Definition bottom_left_corner (c : cell) := last dummy_pt (left_pts c).
Definition bottom_left_cells_lex (open : seq cell) p :=
{in open, forall c, lexPt (bottom_left_corner c) p}.

(* TODO: these should be at the head. *)
Definition left_limit (c : cell) :=
p_x (last dummy_pt (left_pts c)).

Definition right_limit c := p_x (last dummy_pt (right_pts c)).

Lemma add_point_left_limit (c : cell) (p : pt) :
(1 < size (left_pts c))%N ->
left_limit (set_left_pts _ _ c
(head dummy_pt (left_pts c) :: p :: behead (left_pts c))) =
left_limit c.
Proof.
rewrite /left_limit.
by case lptsq : (left_pts c) => [ | p1 [ | p2 ps]].
Qed.

Definition inside_open_cell p c :=
[&& contains_point p c & left_limit c <= p_x p <= open_limit c].

Expand Down
Loading

0 comments on commit 57b7a67

Please sign in to comment.