Logic: problem showing that a formula is valid with Semantic Tableau

I have trouble showing that ((p ∨ q) → r) → (p → (q ∨ r)) it is valid by means of a semantic table.

I know it's valid because I was able to test it using the following truth table:

Table of truth

As far as I know, a semantic table is a test of satisfaction. And a formula is valid if its denial is unsatisfactory. Therefore, I will need to construct a semantic table using formula negation and demonstrate that formula negation is unsatisfactory, making the formula valid.

So this was my attempt to build a semantic box for the formula:

Semantic box

My problem is that there is only one closed branch for this semantic box that I have built. And as far as I know, all branches must be closed so that this negation formula is not valid.

Any idea where I've strayed?

Semantic import that returns different data versus import

I am analyzing data for Covid-19 and found an interesting website: "https://covidtracking.com/api/states/daily.csv". My problem: using SemanticImport, it seems to be stuck on the data I read yesterday even though the site is returning data for today.

The code is simple:

(* versus *)

Import returns:

{{"date", "state", "positive", "negative", "pending", "hospitalized", 
  "death", "total", "dateChecked", "totalTestResults", 
  "deathIncrease", "hospitalizedIncrease", "negativeIncrease", 
  "positiveIncrease", "totalTestResultsIncrease"}, {20200326, "AK", 
  59, 1801, "", 3, 1, 1860, "2020-03-26T20:00:00Z", 1860, 0, 2, 152, 
  17, 169}, {20200326, "AL", 506, 3593, "", "", 1, 4099, 
  "2020-03-26T20:00:00Z", 4099, 1, 0, 1064, 223, 1287}, {20200326, 
  "AR", 335, 1504, 0, 41, 3, 1839, "2020-03-26T20:00:00Z", 1839, 1, 
  19, 67, 55, 122},...}

indicating that there is data available for today (2020-03-26) while SemanticImport returns this:
SemanticImport dataset view

Why is SemanticImport not starting data from 20200326 as shown in Import? I left my current session (I closed Mathematica) and started thinking that some sort of caching is occurring, but it had no effect on the result.

If I can't understand why they are different, I will have to use Import instead of using SemanticImport.

I am using the returned data to assess testing progress for Covid-19 on charts like this:
Test by date (US only)

Functional programming: what does this semantic specification do about shuffling a single card from a Deck?

I have 2 constructor functions and 2 additional functions:

declare: d,d' = deck; c, c' = card

Builder 1)


Builder 2)


additional 1)

addCardRandomly(d', c');

additional 2)

(it returns "CardsInTheDeck(d)+1" when called with addCard(d,c) constructor obviously)

Now, what happens when the function addCardRandomly(d',c') is called with him addCard(d,c) builder?
This is the semantic specification given by the book:

if    random(CardsInTheDeck(d') = CardsInTheDeck(d')+1):
then  addCard(d',c');

else addCard(addCardRandomly(d, c'), c);

What I think it does is:
Since a deck of cards can be treated as a queue, we can take the letter c that our constructor has to insert into the deck and:
if chance returns the first position of the queue
then simply place the card in that position;

otherwise, exchange that card with the card we just randomized and insert the cards on the card in that position once at a time on the card we randomize.

The cards are 1 2 3 4 5 6 7 8

We have to insert 9

Yes random = 5

becomes 1 2 3 4 9 9 5 6 7 8

(case where random = 9 omitted because trivial)

It is right? What makes this recursive specification so complex? How can I visualize and understand this kind of ideas in general? How can I explain this concept once the final solution is reached? This seems very complex to me.
Thank you!

Design – How to identify the concepts of lexical, syntactic and semantic level?


I am trying to identify the lexicon, syntactic Y semantic concepts on this screen of the Waze application, but I don't know if I really understood these concepts.

Are the buttons considered lexical level?

Is it the function that the button performs the syntactic level?

Is the general idea of ​​the Waze application the semantic level?

Can anyone elaborate a little more about these concepts and say what each element of this screen represents and why?

Proof of semantic property of small steps

I am trying to solve exercise 2.20 of the book "Semantics with applications" by Nielson & Nielson. The request is as follows:

Exercise 2.20 Suppose (S1; S2, s) => * (S2, s & # 39;). Show what it is do not necessarily the case that (S1, s) => * s & # 39 ;.

I guess the test should use induction in the length of the derivation sequence, but I don't even know where to start.

I enclose here the table that defines the semantics used.

s.s.s. for the language While

Merge columns during semantic import

If one is trying to use SemanticImport to import geographic data, how do you combine two separate columns (Lat and Lon) into a column that GeoCoordinates needs?

How to change the semantic version number by reversing the last major change

I am trying to plan a system that validates the compatibility of different components by comparing their semantic version number, especially the main version number (since it indicates API changes and compatibility with previous versions). I found the following scenario where I couldn't find an exact answer:

Let's say the code is in the version 2.3.5 and I add a new major API change, therefore, I update the version to 3.0.0. However, a few days after the launch, I find that this change does not adapt to the needs of the users, and I reverse this change so that everything that is compatible with the versions 2.x.x it will be compatible again (note that I am not doing a reversion of the version control, but instead return the previous version of the code in a regular confirmation). Now I can't understand if the new version should be 4.0.0 because again I made a major change in the API and the numbers should always be increased, or, because it will be compatible with previous versions again, use 2.4.0.

I see advantages and problems with both solutions. Are there basic rules or best practices for such cases?

Design: What is the preferred way to validate a "set" semantic input JSON set parameter on a blog website, silently ignore it, or report an error?

I am developing a blog website, for each post, it has a list of tags, just like stackoverflow.

There is no doubt that on the server side, I will expose an API like blog/edit next to the client, and the request parameter as:

class BlogEditParam{
    private List tags;

I definitely need to validate the tags field on the server side, like checking if the name of the tag exists or not, I have no doubt about it.

However the tags the field has semantic "set", it cannot have any duplication. For example, a publication cannot have a list of tags such as:
c++, java, c++

What should I do when dealing with possible duplication in the input parameter? It seems to me that I have two strategies:

  1. Just ignore it in silence. For the example I have shown above, I remove all duplication on the server side and accept this request (of course, the c++ Y java the tag must pass the existing validation)
  2. report an error to the client side when finding such duplication

What is the preferred way in this blog application scenario?

I am using Spring Boot as the server side framework. Use jackson to deserialize the body of the request, I know I could write the input parameter as:

class BlogEditParam{
    private Set tags;

But in fact, it simply ignores duplication when deserialization is done, so like the first strategy I mentioned earlier.

google – Is the placement of semantic elements at the top of the HTML code still relevant?

In rendering times based on JavaScript and CSS, is the placement of semantic elements at the top of the HTML code still relevant?

I mean, if Google can render CSS and Javascript, is it important to place h1 and content at the top of the HTML code?

Since the beginning of this year, Googlebot is a current Chrome. It means: there is no second tracker for simple HTML, everything is represented as in an updated browser.

Case of use:

  • The first page has at the top of the HTML code a h1 and piece of content, which are formatted by CSS to be displayed at the bottom of the visual page
  • The second page has h1 and content at the bottom of the HTML code, but formatted with CSS to be displayed at the top of the page.

Use case question: what is currently better?

Specula, a browser with JavaScript enabled will get h1 and the content of the second page faster than that of the first page, right?

Machine learning: what is the main concept of using the lexical, linguistic, semantic or syntactic approach in NLP for cyberbullying?

I really need some explanation, I am working on a cyberbullying nlp detection tool that I will deploy on the web using django framework, however, I am stuck in some idea, someone can explain to me … What is the main concept of using the lexical approach , linguistic, semantic or syntactic in (NLP) and how it is applied in cyberbullying or what is the step, I know that the POS tag is a way of grouping words and looking for dependency in other words, my idea of ​​the pos tag is a synonym semantics because pos tagging is a process that links words to their root and the word representation in an understandable context corrects me if it is wrong.

I read an article in which an article addressed a project using a predictive analysis approach with feature extraction techniques, navie baye for classification and to train the model, in the discussion they also talked about how another team used the semantic approach to classify cyber bullying I know about data cleanliness, token creation and most of the feature extraction model, however, I am stuck in the problem of approach, which is what is relevant in lexical, semantic or syntactic and how they are addressed.