Theorems · Definition · number theory
GenContFract.of
{K : Type u_1} → [inst : DivisionRing K] → [inst_1 : LinearOrder K] → [FloorRing K] → K → GenContFract KReturns the GenContFract of a value. In fact, the returned gcf is also a ContFract that
terminates if and only if v is rational
(see Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean).
The continued fraction representation of v is given by [⌊v⌋; b₀, b₁, b₂,...], where
[b₀; b₁, b₂,...] recursively is the continued fraction representation of 1 / (v - ⌊v⌋). This
process stops when the fractional part v - ⌊v⌋ hits 0 at some step.
The implementation uses IntFractPair.stream to obtain the partial denominators of the continued
fraction. Refer to said function for more details about the computation process.
- Cited by
- 53 results in Mathlib
- Foundations
- Depth 49 from the axioms · uses propext, Classical.choice, Quot.sound
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites10
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- LinearOrderstatement and proof · cited by 8,572
- DivisionRingstatement and proof · cited by 1,062
- FloorRingstatement and proof · cited by 405
- Stream'.Seqproof · cited by 226
- GenContFractstatement and proof · cited by 68
- Stream'.Seq1proof · cited by 58
- GenContFract.IntFractPairproof · cited by 45
- Stream'.Seq.mapproof · cited by 39
- GenContFract.IntFractPair.bproof · cited by 16
- GenContFract.IntFractPair.seq1proof · cited by 5
Cited by54
Results whose statement or proof uses this declaration.
- GenContFract.of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_nonestatement · cited by 5
- GenContFract.IntFractPair.exists_succ_get?_stream_of_gcf_of_get?_eq_somestatement and proof · cited by 4
- GenContFract.fib_le_of_contsAux_bstatement and proof · cited by 4
- GenContFract.of_one_le_get?_partDenstatement and proof · cited by 4
- GenContFract.of_partNum_eq_onestatement and proof · cited by 4
- GenContFract.get?_of_eq_some_of_succ_get?_intFractPair_streamstatement · cited by 3
- GenContFract.of_correctness_of_terminatedAtstatement and proof · cited by 3
- GenContFract.of_partNum_eq_one_and_exists_int_partDen_eqstatement and proof · cited by 3
- GenContFract.abs_sub_convs_lestatement and proof · cited by 2
- GenContFract.compExactValue_correctness_of_stream_eq_somestatement and proof · cited by 2
- GenContFract.exists_gcf_pair_rat_eq_nth_contsstatement · cited by 2
- GenContFract.le_of_succ_get?_denstatement and proof · cited by 2