Skip to content

Commit 127c7d4

Browse files
committed
prettier printing of coordinates in ritt-wu proof
1 parent c4f6911 commit 127c7d4

File tree

5 files changed

+31
-21
lines changed

5 files changed

+31
-21
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ prove(hp, th)
7676
Assigned coordinates:
7777
---------------------
7878
A = (0, 0)
79-
B = (u[1], 0)
80-
C = (x[1], u[2])
81-
M₁ = (x[2], x[3])
82-
M₂ = (x[4], x[5])
83-
M₃ = (x[6], x[7])
84-
H = (x[8], x[9])
85-
O = (x[10], x[11])
79+
B = (u₁, 0)
80+
C = (x₁, u₂)
81+
M₁ = (x₂, x₃)
82+
M₂ = (x₄, x₅)
83+
M₃ = (x₆, x₇)
84+
H = (x₈, x₉)
85+
O = (x₁₀, x₁₁)
86+
8687
Goal 1: success
8788
8889
Nondegeneracy conditions:
@@ -113,5 +114,5 @@ u₂ ≠ 0
113114
[ci-img]: https://github.com/lucaferranti/GeometricTheoremProver.jl/workflows/CI/badge.svg
114115
[ci-url]: https://github.com/lucaferranti/GeometricTheoremProver.jl/actions
115116

116-
[cov-img]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl/branch/master/graph/badge.svg
117-
[cov-url]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl
117+
[cov-img]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl/branch/main/graph/badge.svg?token=EzyZPusnKj
118+
[cov-url]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl

docs/src/index.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GeometricTheoremProver
22

3-
[![license: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](../../LICENSE)[![CI](https://github.com/lucaferranti/GeometricTheoremProver.jl/workflows/CI/badge.svg)](https://github.com/lucaferranti/GeometricTheoremProver.jl/actions)[![codecov](https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl)
3+
[![license: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](../../LICENSE)[![CI](https://github.com/lucaferranti/GeometricTheoremProver.jl/workflows/CI/badge.svg)](https://github.com/lucaferranti/GeometricTheoremProver.jl/actions)[![codecov](https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl/branch/main/graph/badge.svg?token=EzyZPusnKj)](https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl)
44

55
## Overview
66

@@ -76,13 +76,14 @@ prove(hp, th)
7676
Assigned coordinates:
7777
---------------------
7878
A = (0, 0)
79-
B = (u[1], 0)
80-
C = (x[1], u[2])
81-
M₁ = (x[2], x[3])
82-
M₂ = (x[4], x[5])
83-
M₃ = (x[6], x[7])
84-
H = (x[8], x[9])
85-
O = (x[10], x[11])
79+
B = (u₁, 0)
80+
C = (x₁, u₂)
81+
M₁ = (x₂, x₃)
82+
M₂ = (x₄, x₅)
83+
M₃ = (x₆, x₇)
84+
H = (x₈, x₉)
85+
O = (x₁₀, x₁₁)
86+
8687
Goal 1: success
8788
8889
Nondegeneracy conditions:

src/rittwu/coordinates.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ struct Coordinate{T, S}
22
x::T
33
y::S
44
end
5-
show(io::IO, c::Coordinate) = print(io, "(", c.x, ", ", c.y, ")")
5+
function show(io::IO, c::Coordinate)
6+
print(io, "(")
7+
show(io, c.x)
8+
print(io, ", ")
9+
show(io, c.y)
10+
print(io, ")")
11+
end
612

713
function compute_num_variables(hp::Hypothesis)
814
total_free = 0

src/rittwu/prove.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function show(io::IO, rwp::RittWuProof)
1515
for (P, c) in rwp.coords
1616
println(io, P, " = ", c)
1717
end
18+
println(io)
1819
for (idx, p) in enumerate(eachcol(rwp.R))
1920
status = iszero(first(p)) ? "success" : "fail"
2021
println(io, "Goal $idx: $status")

src/theorem/theorem.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,10 @@ julia> prove(hp, th)
148148
Assigned coordinates:
149149
---------------------
150150
A = (0, 0)
151-
B = (u[1], 0)
152-
C = (u[2], u[3])
153-
D = (x[1], x[2])
151+
B = (u₁, 0)
152+
C = (u₂, u₃)
153+
D = (x₁, x₂)
154+
154155
Goal 1: success
155156
156157
Nondegeneracy conditions:

0 commit comments

Comments
 (0)