Skip to content

Commit

Permalink
prettier printing of coordinates in ritt-wu proof
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaferranti committed Jan 16, 2022
1 parent c4f6911 commit 127c7d4
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ prove(hp, th)
Assigned coordinates:
---------------------
A = (0, 0)
B = (u[1], 0)
C = (x[1], u[2])
M₁ = (x[2], x[3])
M₂ = (x[4], x[5])
M₃ = (x[6], x[7])
H = (x[8], x[9])
O = (x[10], x[11])
B = (u₁, 0)
C = (x₁, u₂)
M₁ = (x₂, x₃)
M₂ = (x₄, x₅)
M₃ = (x₆, x₇)
H = (x₈, x₉)
O = (x₁₀, x₁₁)
Goal 1: success
Nondegeneracy conditions:
Expand Down Expand Up @@ -113,5 +114,5 @@ u₂ ≠ 0
[ci-img]: https://github.com/lucaferranti/GeometricTheoremProver.jl/workflows/CI/badge.svg
[ci-url]: https://github.com/lucaferranti/GeometricTheoremProver.jl/actions

[cov-img]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl/branch/master/graph/badge.svg
[cov-url]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl
[cov-img]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl/branch/main/graph/badge.svg?token=EzyZPusnKj
[cov-url]: https://codecov.io/gh/lucaferranti/GeometricTheoremProver.jl
17 changes: 9 additions & 8 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GeometricTheoremProver

[![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)
[![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)

## Overview

Expand Down Expand Up @@ -76,13 +76,14 @@ prove(hp, th)
Assigned coordinates:
---------------------
A = (0, 0)
B = (u[1], 0)
C = (x[1], u[2])
M₁ = (x[2], x[3])
M₂ = (x[4], x[5])
M₃ = (x[6], x[7])
H = (x[8], x[9])
O = (x[10], x[11])
B = (u₁, 0)
C = (x₁, u₂)
M₁ = (x₂, x₃)
M₂ = (x₄, x₅)
M₃ = (x₆, x₇)
H = (x₈, x₉)
O = (x₁₀, x₁₁)
Goal 1: success
Nondegeneracy conditions:
Expand Down
8 changes: 7 additions & 1 deletion src/rittwu/coordinates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ struct Coordinate{T, S}
x::T
y::S
end
show(io::IO, c::Coordinate) = print(io, "(", c.x, ", ", c.y, ")")
function show(io::IO, c::Coordinate)
print(io, "(")
show(io, c.x)
print(io, ", ")
show(io, c.y)
print(io, ")")
end

function compute_num_variables(hp::Hypothesis)
total_free = 0
Expand Down
1 change: 1 addition & 0 deletions src/rittwu/prove.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function show(io::IO, rwp::RittWuProof)
for (P, c) in rwp.coords
println(io, P, " = ", c)
end
println(io)
for (idx, p) in enumerate(eachcol(rwp.R))
status = iszero(first(p)) ? "success" : "fail"
println(io, "Goal $idx: $status")
Expand Down
7 changes: 4 additions & 3 deletions src/theorem/theorem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ julia> prove(hp, th)
Assigned coordinates:
---------------------
A = (0, 0)
B = (u[1], 0)
C = (u[2], u[3])
D = (x[1], x[2])
B = (u₁, 0)
C = (u₂, u₃)
D = (x₁, x₂)
Goal 1: success
Nondegeneracy conditions:
Expand Down

2 comments on commit 127c7d4

@lucaferranti
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/52552

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 127c7d4a5c7a15b39a7771eaca4ddd2329f7d3bc
git push origin v0.1.0

Please sign in to comment.