A prolog application of basic interactions between elementary particles.
The main idea behind this project is to create a system that will tell you when an interaction
of the form A + B --> C + D + E + ...
or a decay of the form A --> B + C + D + ...
, where A, B, C, D, E are elementary particles, is possible or not.
For the time being, you can consult the knowledge base, do basic simple (or filtered) queries, and check if an interaction or decay is possible at a higher level. When I say a higher level, I mean that I'm not taking into account the quarks, nor the quantum numbers such as strangeness, topness, botomness and charm.
You can check here the interactions and decays that pass or don't pass the tests with this library, and here the queries.
For future ideas and goals check the CONTRIBUTING page.
You're expected to have GnuProlog or SWI-Prolog installed.
On Ubuntu:
sudo apt install gprolog
or
sudo apt install swi-prolog
Go inside the particleslogic folder from a terminal and get a Prolog REPL running.
From inside the prolog REPL (gprolog
or swipl
):
?- consult('src/particles.pl').
Now, let's say that you want to find out the mass of the electron. You'll type:
?- mass(electron, M).
And you'll get:
M = 0.511.
Let's say that you want to find the lifetime of all the particles.
You'll type:
?- lifetime(Particle, Lifetime).
And you'll get (it will stop when the base runs out of particles, or when you press "." or enter instead of ";"):
Particle = electron,
Lifetime = 'Stable' ;
Particle = positron,
Lifetime = 'Stable' ;
Particle = electron_neutrino,
Lifetime = 'Stable' ;
Particle = anti_electron_neutrino,
Lifetime = 'Stable' ;
Particle = muon,
Lifetime = 2.19e-6 ;
Particle = anti_muon,
Lifetime = 2.19e-6 ;
Particle = muon_neutrino,
Lifetime = 'Stable' ;
Particle = tau,
Lifetime = 3.3e-13 .
Querying and filtering the database:
Let's say that you want to find all the particles with mass greater than 30 MeV/c^2 and less than 200 MeV/c^2:
?- mass(Particle, Mass), Mass > 30, Mass < 200.
Then we get:
Particle = muon,
Mass = 105.7 ;
Particle = anti_muon,
Mass = 105.7 ;
Particle = pion,
Mass = 139.6 ;
Particle = anti_pion,
Mass = 139.6 ;
Particle = pion0,
Mass = 135.0 ;
Particle = strange,
Mass = 95 ;
Particle = anti_strange,
Mass = 95 ;
false.
First you'll have to load the laws.pl
library:
?- consult('src/laws.pl').
Then, to check say the interaction electron + positron --> photon + photon
you type in the REPL:
?- possible_interaction_first_level([electron, positron], [photon,photon]).
true.
Once you have loaded the laws.pl
library you can check if a decay is possible:
For example, let's check the muon
decay: muon --> electron + muon_neutrino + anti_electron_neutrino
if it is possible:
?- possible_interaction_first_level([muon], [electron, muon_neutrino, anti_electron_neutrino]).
true.
Particle name (symbol)
- electron
$\large (e^{-}$ ) - positron
$\large (e^{+}$ ) - electron_neutrino (
$\large \nu_e$ ) - anti_electron_neutrino (
$\large \bar{\nu}_e$ ) - muon (
$\large \mu^{-}$ ) - anti_muon (
$\large \mu^{+}$ ) - muon_neutrino (
$\large \nu_{\mu}$ ) - anti_muon_neutrino (
$\large \bar{\nu}_{\mu}$ ) - tau (
$\large \tau^{-}$ ) - anti_tau (
$\large \tau^{+}$ ) - tau_neutrino (
$\large \nu_\tau$ ) - anti_tau_neutrino (
$\large \bar{\nu}_\tau$ )
- pion (
$\large \pi^{+}$ ) - anti_pion (
$\large \pi^{-}$ ) - pion0 (
$\large \pi^{0}$ ) - kaon (
$\large K^{+}$ ) - anti_kaon (
$\large K^{-}$ ) - kaon_s0 (
$\large K^{0}_{S}$ ) - anti_kaon_s0 (
$\large \bar{K}^{0}_{S}$ ) - kaon_l0 (
$\large K^{0}_{L}$ ) - anti_kaon_l0 (
$\large \bar{K}^{0}_{L}$ ) - eta (
$\large \eta$ ) - eta1 (
$\large \eta^{'}$ )
- proton (
$\large p$ ) - anti_proton (
$\large \bar{p}$ ) - neutron (
$\large n$ ) - lambda (
$\large \Lambda^{0}$ ) - anti_lambda (
$\large \bar{\Lambda}^{0}$ ) - sigma (
$\large \Sigma^{+}]$ ) - anti_sigma (
$\large \bar{\Sigma}^{-}$ ) - sigma0 (
$\large \Sigma^{0}$ ) - anti_sigma0 (
$\large \bar{\Sigma}^{0}$ ) - sigma_minus (
$\large \Sigma^{-}$ ) - anti_sigma_minus (
$\large \bar{\Sigma}^{+}$ ) - delta (
$\large \Delta^{++}$ ) - anti_delta (
$\large \bar{\Delta}$ ) - delta_plus (
$\large \Delta^{+}$ ) - anti_delta_plus (
$\large \bar{\Delta}^{-}$ ) - delta0 (
$\large \Delta^{0}$ ) - anti_delta0 (
$\large \bar{\Delta}^{0}$ ) - delta_minus (
$\large \Delta^{-}$ ) - anti_delta_minus (
$\large \bar{\Delta}^{+}$ ) - xi0 (
$\large \Xi^{0}$ ) - anti_xi0 (
$\large \bar{\Xi}^{0}$ ) - xi_minus (
$\large \Xi^{-}$ ) - anti_xi_minus (
$\large \Xi^{+}$ ) - omega (
$\large \Omega^{-}$ ) - anti_omega (
$\large \Omega^{+}$ )
- up (
$\large u$ ) - anti_up (
$\large \bar{u}$ ) - down (
$\large d$ ) - anti_down (
$\large \bar{d}$ ) - strange (
$\large s$ ) - anti_strange (
$\large \bar{s}$ ) - charm (
$\large c$ ) - anti_charm (
$\large \bar{c}$ ) - bottom (
$\large b$ ) - anti_bottom (
$\large \bar{b}$ ) - top (
$\large t$ ) - anti_top (
$\large \bar{t}$ )
- photon (
$\large \gamma$ ) - gluon (
$\large g$ ) - z0_boson (
$\large Z^{0}$ ) - w_plus_boson (
$\large W^{+}$ ) - w_minus_boson (
$\large W^{-}$ )
- higgs (
$\large H^{0}$ )
- Ivan Bratko, Prolog programming for artificial intelligence, Addison Wesley, Year: 2001, ISBN: 9780201403756, 0201403757
- Raymond A. Serway, Clement J. Moses, Curt A. Moyer, Modern physics, Thomson Brooks Cole, Year: 2005, ISBN: 9780534493394, 0534493394
- PROLOG Facts, Rules and Queries
- O. Raggos, Logical programming and Prolog, greek notes (rarred pdfs), University of Patras, 2013
- John Malpas, PROLOG: A Relational Language and Its Applications, Prentice-Hall, Year: 1987, ISBN: 978-0137308057, 0137308051
- David Griffiths, Introduction to Elementary Particles, Willey-VCH, Year:2008, ISBN:978-3527406012, 9783527406012
- Jun John Sakurai, Invariance Principles and Elementary Particles, Princeton University Press, Year: 1964
- Wikipedia: Particle Decay
- Wikipedia: Standard Model
- Wikipedia: Antiparticle
- Wikipedia: List of Particles
- Wikipedia: Fermion
- Wikipedia: Boson
- Wikipedia: List of mesons
- Wikipedia: Quarks#Mass
- Physics.stackexchange: Can we talk on the conservation of spin?
- Physicsworld.com: The spin of a proton
- Particle zoo: the W boson
- Particle zoo: the Z0 boson
- Particle zoo: the gluon
- Particle zoo: the strange quark
- Particle zoo: the charm quark
- Particle zoo: the bottom quark
- Particle zoo: the top quark
- HyperPhysics: Particle Interactions and Conservation Laws
- Physics LibreTexts: Particle Conservation Laws
- Particle Data Group
- Physics.stackexchange: Adding three electron spins
- Markdown cheatsheet
- A hack for showing LaTeX formulas in GitHub markdown.md
- Github supports $\LaTeX$ now
Kindly do see CONTRIBUTING and CODE OF CONDUCT for more information.