Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example #218

Merged
merged 16 commits into from
Dec 1, 2023
Merged

example #218

merged 16 commits into from
Dec 1, 2023

Conversation

Thmoas-Guan
Copy link
Contributor

No description provided.

variable {M : Plane} {hm : M = Quadrilateral_cvx.diag_inx (QDR_cvx A B C D (is_convex_of_is_prg hprg))}
-- Let $P$ and $Q$ be points on $AM$ and $MC$, respectively, such that $MP = MQ$.
variable {P Q : Plane} {hp : Seg.IsInt P (SEG A M)} {hq : Seg.IsInt Q (SEG M C)} {hpq : (SEG P M).length = (SEG M Q).length}
-- State the main goal.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write out the main goal explicitly.

variable {P Q : Plane} {hp : Seg.IsInt P (SEG A M)} {hq : Seg.IsInt Q (SEG M C)} {hpq : (SEG P M).length = (SEG M Q).length}
-- State the main goal.
theorem SCHAUM_Problem_1_13 : Quadrilateral.IsParallelogram (QDR P B Q D) := by
have m1 : M = (SEG B D).midpoint := by
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

such a lemma should be equipped with comments.
-- Point $M$ is the midpoint of the segment $BD$.

· simp
exact hpq
apply is_prg_of_diag_inx_eq_mid_eq_mid
rw [← m1, ← m2]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 35 36 should have a comment.

variable {M : P} {median_M_position : M = (SEG B C).midpoint}
--Prove that $DM = EM$.
theorem Problem_1_1 : (SEG D M).length = (SEG E M).length := by
have h₀ : (SEG A B).length = (SEG A C).length := by
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this looks very clear, it still needs a comment.
-- We show that the length of segment $AB$ equals to length of $AC$

have a_ne_b : A ≠ B := (ne_of_not_colinear hnd).2.2.symm
have c_ne_b : C ≠ B := (ne_of_not_colinear hnd).1
have a_ne_c : A ≠ C := (ne_of_not_colinear hnd).2.1
have b_ne_c : B ≠ C := (ne_of_not_colinear hnd).1.symm
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Line 31 to Line 41, add a single comment to explain what each line do
-- Point $A$ is not equals to point $B$.

have c_ne_b : C ≠ B := (ne_of_not_colinear hnd).1
have a_ne_c : A ≠ C := (ne_of_not_colinear hnd).2.1
have b_ne_c : B ≠ C := (ne_of_not_colinear hnd).1.symm
--the second edge of congruence
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment should be written as the style of proving in human-readable language, not comment of code.
-- the length of $BD$ equals to length of $CE$.

_= (SEG E C).length := by
rw [← eq_sub_of_add_eq']
exact (length_eq_length_add_length (SEG A C) E (E_on_seg)).symm
_= (SEG C E).length := length_eq_length_of_rev (SEG E C)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the calc mode needs comments too.

apply (is_isoceles_tri_iff_ang_eq_ang_of_nd_tri (tri_nd := ⟨▵ A B C, hnd⟩)).mp
exact hisoc
rw [h₅₃]
have h₆ : TRI_nd B D M h₁ ≅ₐ TRI_nd C E M h₂ := by
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment here what congruence criterion and what condition you use to show the congruence.

Copy link
Owner

@jjdishere jjdishere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still it need to add/improve lots of comments. I'll show an example in Friday's afternoon.

@jjdishere jjdishere merged commit 433de06 into jjdishere:master Dec 1, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants