212 research outputs found

    Coinductive Formal Reasoning in Exact Real Arithmetic

    Full text link
    In this article we present a method for formally proving the correctness of the lazy algorithms for computing homographic and quadratic transformations -- of which field operations are special cases-- on a representation of real numbers by coinductive streams. The algorithms work on coinductive stream of M\"{o}bius maps and form the basis of the Edalat--Potts exact real arithmetic. We use the machinery of the Coq proof assistant for the coinductive types to present the formalisation. The formalised algorithms are only partially productive, i.e., they do not output provably infinite streams for all possible inputs. We show how to deal with this partiality in the presence of syntactic restrictions posed by the constructive type theory of Coq. Furthermore we show that the type theoretic techniques that we develop are compatible with the semantics of the algorithms as continuous maps on real numbers. The resulting Coq formalisation is available for public download.Comment: 40 page

    Representations of first order function types as terminal coalgebras

    Get PDF
    Cosmic rays provide an important source for free electrons in Earth's atmosphere and also in dense interstellar regions where they produce a prevailing background ionization. We utilize a Monte Carlo cosmic ray transport model for particle energies of 10(6) eV <E <10(9) eV, and an analytic cosmic ray transport model for particle energies of 10(9) eV <E <10(12) eV in order to investigate the cosmic ray enhancement of free electrons in substellar atmospheres of free-floating objects. The cosmic ray calculations are applied to Drift-Phoenix model atmospheres of an example brown dwarf with effective temperature T-eff = 1500 K, and two example giant gas planets (T-eff = 1000 K, 1500 K). For the model brown dwarf atmosphere, the electron fraction is enhanced significantly by cosmic rays when the pressure p(gas) <10(-2) bar. Our example giant gas planet atmosphere suggests that the cosmic ray enhancement extends to 10(-4)-10(-2) bar, depending on the effective temperature. For the model atmosphere of the example giant gas planet considered here (T-eff = 1000 K), cosmic rays bring the degree of ionization to f(e) greater than or similar to 10(-8) when p(gas) <10(-8) bar, suggesting that this part of the atmosphere may behave as a weakly ionized plasma. Although cosmic rays enhance the degree of ionization by over three orders of magnitude in the upper atmosphere, the effect is not likely to be significant enough for sustained coupling of the magnetic field to the gas.Publisher PDFPeer reviewe

    Imperative Object-based Calculi in (Co)Inductive Type Theories

    Get PDF
    We discuss the formalization of Abadi and Cardelli's imps, a paradigmatic object-based calculus with types and side effects, in Co-Inductive Type Theories, such as the Calculus of (Co)Inductive Constructions (CC(Co)Ind). Instead of representing directly the original system "as it is", we reformulate its syntax and semantics bearing in mind the proof-theoretical features provided by the target metalanguage. On one hand, this methodology allows for a smoother implementation and treatment of the calculus in the metalanguage. On the other, it is possible to see the calculus from a new perspective, thus having the occasion to suggest original and cleaner presentations. We give hence anew presentation of imps, exploiting natural deduction semantics, (weak) higher-order abstract syntax, and, for a significant fragment of the calculus, coinductive typing systems. This presentation is easier to use and implement than the original one, and the proofs of key metaproperties, e.g. subject reduction, are much simpler. Although all proof developments have been carried out in the Coq system, the solutions we have devised in the encoding of and metareasoning on imps can be applied to other imperative calculi and proof environments with similar features

    The under-performing unfold: a new approach to optimising corecursive programs

    Get PDF
    This paper presents a new approach to optimising corecursive programs by factorisation. In particular, we focus on programs written using the corecursion operator unfold. We use and expand upon the proof techniques of guarded coinduction and unfold fusion, capturing a pattern of generalising coinductive hypotheses by means of abstraction and representation functions. The pattern we observe is simple, has not been observed before, and is widely applicable. We develop a general program factorisation theorem from this pattern, demonstrating its utility with a range of practical examples

    Partiality, revisited: the partiality monad as a quotient inductive-inductive type

    Get PDF
    Capretta's delay monad can be used to model partial computations, but it has the ``wrong'' notion of built-in equality, strong bisimilarity. An alternative is to quotient the delay monad by the ``right''notion of equality, weak bisimilarity. However, recent work by Chapman et al. suggests that it is impossible to define a monad structure on the resulting construction in common forms of type theory without assuming (instances of) the axiom of countable choice. Using an idea from homotopy type theory---a higher inductive-inductive type---we construct a partiality monad without relying on countable choice. We prove that, in the presence of countable choice, our partiality monad is equivalent to the delay monad quotiented by weak bisimilarity. Furthermore we outline several applications
    • …
    corecore