<commit_before># coding: utf-8
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

ring = Structure.create do |r|
  r.name_en = 'Ring'
  r.name_de = 'Ring'
  r.definition_en = 'A ring $R$ is an abelian group together with a ' +
                    'map $R\times R …'
end

unitary = Property.create({name_en: 'unitary', structure: ring})

l_noeth = Property.create do |p|
  p.name_en = 'left Noetherian'
  p.name_de = 'linksnoethersch'
  p.structure = ring
end

r_noeth = Property.create do |p|
  p.name_en = 'right Noetherian'
  p.name_de = 'rechtsnoethersch'
  p.structure = ring
end

comm = Property.create do |p|
  p.name_en = 'commutative'
  p.structure = ring
end

vnr = Property.create do |p|
  p.name_en = 'von Neumann regular (aka absolutely flat)'
  p.name_de = 'von Neumann regulär'
  p.structure = ring
end

rmod = Structure.create do |s|
  s.name_en = '$R$-(left-)Module'
  s.name_de = '$R$-(links-)Modul'
end

base_ring = BuildingBlock.create do |b|
  b.name_en = 'base ring'
  b.explained_structure = rmod
  b.structure = ring

  b.definition_en = 'A ring homomorphism $R\longrightarrow ' +
                     '\mathrm{End}(M)$ …'

end

fin_gen = Property.create({name_en: 'finitely generated', structure: rmod})
noeth_module = Property.create({name_en: 'ascending chain condition for ' +
                               'submodules', structure: rmod})

base_ring_is_lnoeth = Atom.create({stuff_w_props: base_ring, property:
                                   l_noeth})
module_is_fg = Atom.create({stuff_w_props: rmod, property: fin_gen})
module_has_acc = Atom.create({stuff_w_props: rmod, property: noeth_module})

fg_and_noeth_base_ring_implies_noeth = Implication.create({atoms:
                                                             [module_is_fg,
                                                              base_ring_is_lnoeth
                                                             ],
                                                           implies:
                                                             module_has_acc})
integers = Example.create do |e|
  e.structure = ring
  e.explanation_en = 'Integers'<commit_msg>add (commutative => (rnoeth <=> lnoeth)) to seed.rb<commit_after># coding: utf-8
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

ring = Structure.create do |r|
  r.name_en = 'Ring'
  r.name_de = 'Ring'
  r.definition_en = 'A ring $R$ is an abelian group together with a ' +
                    'map $R\times R …'
end

unitary = Property.create({name_en: 'unitary', structure: ring})

l_noeth = Property.create do |p|
  p.name_en = 'left Noetherian'
  p.name_de = 'linksnoethersch'
  p.structure = ring
end

r_noeth = Property.create do |p|
  p.name_en = 'right Noetherian'
  p.name_de = 'rechtsnoethersch'
  p.structure = ring
end

comm = Property.create do |p|
  p.name_en = 'commutative'
  p.structure = ring
end

vnr = Property.create do |p|
  p.name_en = 'von Neumann regular (aka absolutely flat)'
  p.name_de = 'von Neumann regulär'
  p.structure = ring
end

rmod = Structure.create do |s|
  s.name_en = '$R$-(left-)Module'
  s.name_de = '$R$-(links-)Modul'
end

base_ring = BuildingBlock.create do |b|
  b.name_en = 'base ring'
  b.explained_structure = rmod
  b.structure = ring

  b.definition_en = 'A ring homomorphism $R\longrightarrow ' +
                     '\mathrm{End}(M)$ …'

end

Implication.create do |i|
  i.atoms = [comm.to_atom, l_noeth.to_atom]
  i.implies = r_noeth
end

Implication.create do |i|
  i.atoms = [comm.to_atom, r_noeth.to_atom]
  i.implies = l_noeth
end

fin_gen = Property.create({name_en: 'finitely generated', structure: rmod})
noeth_module = Property.create({name_en: 'ascending chain condition for ' +
                               'submodules', structure: rmod})

base_ring_is_lnoeth = Atom.create({stuff_w_props: base_ring, property:
                                   l_noeth})
module_is_fg = Atom.create({stuff_w_props: rmod, property: fin_gen})
module_has_acc = Atom.create({stuff_w_props: rmod, property: noeth_module})

Implication.create do |i|
  i.atoms = [module_is_fg, base_ring_is_lnoeth]
  i.implies = module_has_acc
end

integers = Example.create do |e|
  e.structure = ring
  e.explanation_en = 'Integers'
{'fraction_non_alphanumeric': 0.11380443714050945, 'fraction_numerical': 0.0004108463434675431, 'mean_word_length': 2.6914329037149356, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5340505', 'n_tokens_mistral': 1668, 'n_tokens_neox': 1609, 'n_words': 435}